Martinsburg is a borough in the Morrisons Cove section of Blair County, Pennsylvania, United States. The population was 1,874 at the 2020 census. It is part of the Altoona, PA Metropolitan Statistical Area.