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.
By 1777, a road had been well established between York and Baltimore, and Stewartstown's main street of today lies along a portion of the road. Around 1812, a group of farmers set out to establish a town in south central Hopewell Township. The earliest buildings were several houses, a workshop for making furniture and wheels, a store, and a tavern. Anthony Stewart, owner of the workshop, served as the village clerk, and his shop became the main meeting place.
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.