Shirley is a town in Middlesex County, Massachusetts, United States. It is approximately fifty miles west-northwest of Boston. The population was 7,211 at the 2010 census. 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.
The inhabitants at the time of European encounter were Nipmuc (or Pennacook) Indians, who called the area Catacunemaug. Once part of "The Plantation of Groton," Shirley was first settled by English pioneers about 1720.
In 1753 it separated from Groton and was incorporated, named in honor of William Shirley, governor of Massachusetts (1741–1757). A paper mill was built here around 1790 and in 1812 Shirley established the first of seven cotton mills. Other local products included iron, nails, textiles, rope, belts, suspenders, and athletic equipment. Two of the large 19th-century mill buildings have been subdivided and adapted for use by 21st-century businesses.
A medium-security state prison was built on land surrounding the remains of the Shaker village in Shirley, and continues to operate.