Shirley, Massachusetts

Shirley, Massachusetts
Old Shirley Municipal Building in 2008.
Location in Middlesex County in Massachusetts
Coordinates: 42°33′31″N 71°38′47″W / 42.55861°N 71.64639°W / 42.55861; -71.64639
CountryUnited States
StateMassachusetts
CountyMiddlesex
Settled1720
Incorporated1753
Government
 • TypeOpen town meeting
Area
 • Total
15.9 sq mi (41.2 km2)
 • Land15.8 sq mi (41.0 km2)
 • Water0.077 sq mi (0.2 km2)
Elevation
279 ft (85 m)
Population
 (2020)
 • Total
7,431
 • Density469/sq mi (181/km2)
Time zoneUTC-5 (Eastern)
 • Summer (DST)UTC-4 (Eastern)
ZIP Codes
Area code351 / 978
FIPS code25-61590
GNIS feature ID0618234
Websiteshirley-ma.gov

Shirley is a town in Middlesex County, Massachusetts, United States. It is approximately thirty miles west-northwest of Boston. The population was 7,431 at the 2020 census. It contains census-designated place of Shirley and part of Devens. The town has a well-preserved historic New England town center.

It is home to the Massachusetts Correctional Institution – Shirley, a medium-security state prison. (The neighboring maximum-security Souza-Baranowski Correctional Center lies just outside the town limits in the town of Lancaster.) The remains of a Shaker village have been preserved within the grounds of the prison.