Walpole is a town in Norfolk County, Massachusetts, United States. It is located about 17.9 miles south of Boston and 23.5 miles north of Providence, Rhode Island. The population was 22,824 at the 2000 census. Walpole was first settled in 1659 and was considered a part of Dedham until officially incorporated in 1724. The town was named after Sir Robert Walpole, de facto first Prime Minister of Great Britain.