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.
Stewartstown's location makes it an ideal bedroom community for both commuters in Harrisburg and Baltimore.