Stewartstown is a borough in York County, Pennsylvania, United States. The population was 2,089 at the 2010 census. There were settlers in the Stewartstown area as early as 1750. This part of southern York County was claimed by both Maryland and Pennsylvania, and the boundary dispute was settled by the surveying of the Mason–Dixon Line in 1767.
The village was first known as Meadstown, after Benedict Meads, owner of the tavern and the store. Later it became known as Mechanicsburg because of a large amount of tradesmen who lived in the community. By 1828, the town had its own post office, and Stewart was appointed the first postmaster. There was already another Pennsylvania town named Mechanicsburg, so postal officials assigned the name "Guilford" to the community. Through the efforts of Anthony Stewart, with the help of Judge Adam Ebaugh, the Post Office Department changed the town's postmark to "Stewartstown" on March 24, 1832.
The Stewartstown Engine House, Stewartstown Railroad and Stewartstown Railroad Station are listed on the National Register of Historic Places.