Settlers began arriving around 1801. Martinsburg was established from part of the town of Turin in 1803. When it was formed the town name was spelled "Martinsburgh". In 1819, the town was augmented by more of Turin. The community of Martinsburg in the town was the county seat for Lewis County until 1864, when it moved to Lowville. The town hall in Martinsburg, built in 1812, is the site of the first county court session, held the same year. In 1839, it was the site of the only execution in the county. The Gen. Walter Martin House and Martinsburg Town Hall are listed on the National Register of Historic Places.
At the 2000 census, there were 1,249 people, 473 households and 347 families residing in the town. The population density was 16.5 per square mile. There were 627 housing units at an average density of 8.3 per square mile. The racial makeup of the town was 98.00% White, 0.48% African American, 0.48% Native American, 0.24% from other races, and 0.80% from two or more races. Hispanic or Latino of any race were 0.48% of the population. There were 473 households of which 34.9% had children under the age of 18 living with them, 61.3% were married couples living together, 7.2% had a female householder with no husband present, and 26.6% were non-families. 22.8% of all households were made up of individuals and 8.2% had someone living alone who was 65 years of age or older. The average household size was 2.64 and the average family size was 3.11. 28.3% of the population were under the age of 18, 7.8% from 18 to 24, 28.9% from 25 to 44, 22.3% from 45 to 64, and 12.7% who were 65 years of age or older. The median age was 36 years. For every 100 females, there were 103.4 males. For every 100 females age 18 and over, there were 103.2 males. The median household income was $31,902 and the median family income was $35,978. Males had a median income of $26,705 compared with $20,682 for females. The per capita income for the town was $13,894. About 7.9% of families and 11.9% of the population were below the poverty line, including 18.3% of those under age 18 and 9.6% of those age 65 or over.
Communities and locations in Martinsburg
East Martinsburg - a hamlet east of Martinsburg village and located on NY-12.
Glendale - a hamlet south of East Martinsburg.
Glenfield - a hamlet east of Glendale on the west side of the Black River.
Graves Corners - a location east of Wetmore.
Martinsburg - the hamlet of Martinsburg is on NY-26 south of Lowville; it was the first county seat of Lewis County.
McGraw Corners - a location east of Wetmore.
Tabolt Corners - a location by the south town line.