Stoughton was first settled in 1713 in Suffolk County and was officially set off from Dorchester's South Precinct and incorporated as Stoughton on 22 Dec 1726. A few years later, around eight square miles from Dorchester and Stoughton were annexed to Dedham, after which, on 11 December 1738, the bounds between Stoughton and Dedham were established. Boundaries for the town of Stoughton changed through the years as new towns and villages were created and parts of Stoughton were annexed to other towns. The Second Precinct of Stoughton (now Sharon and Foxborough) was set off and incorporated on 2 July 1740 and parts of Stoughton were annexed to Walpole (on 25 November 1752 and 25 October 1755) and to Bridgewater on 20 November 1770. Stoughtonham, a district of Stoughton, was established on 21 June 1765, became an official town along with other Stoughton districts, and changed its name to Sharon on 25 February 1783. Additional parts of Stoughton were annexed to Dedham on 17 June 1780, to Sharon on 16 February 1789 and 22 February 1792, and to Foxborough on 12 March 1793.
On 20 June 1793, the Southwestern three-quarters of Suffolk County including Stoughton and the town of Cohasset were set off as the new county of Norfolk and the town's boundaries continued to change. On 23 February 1797, the most northern region of Stoughton was incorporated as the town of Canton, and on 8 February 1798, part of Stoughton was annexed to Bridgewater. On 31 March 1847 part of Canton was annexed back to Stoughton and on 21 February 1888 part of Stoughton was set off and the town of Avon established and incorporated. The bounds between Stoughton and Sharon were established on 28 April 1924 and again on 11 April 1957.