Shirley is a town in Middlesex County, Massachusetts, United States. It is approximately fifty miles north of Boston. The population was 7,211 at the 2010 census. The town has a well preserved historic New England town center and 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 are located on the prison grounds.
The first inhabitants were either Nipmuc (or Pennacook) Indians, who called the area Catacunemaug. Once part of "The Plantation of Groton," Shirley was first settled about 1720. It broke away from Groton to be incorporated in 1753. The town was 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 are being used by 21st century businesses.
A utopian religious community was established in Shirley in 1793. The Shakers advocated pacifism, common property, celibacy and communal living. They are renowned for their plain architecture and furniture. The Shaker movement peaked in the 1840s, but gradually dwindled, perhaps because of greater employment opportunities offered by the Industrial Revolution, or because succeeding generations grew less tolerant of the Shaker church's insistence on self-abnegation. Shirley Shaker Village closed in 1908. Today, only one "society" remains in the control of the last Shakers, located at Sabbathday Lake Shaker Village in New Gloucester, Maine. Several other Shaker village sites operate today as museums. A similar community was founded in nearby Harvard.