Hampshire is a village in Kane and McHenry counties, Illinois, United States.
The village is bordered to the northeast by Huntley and to the southeast by Pingree Grove.
Illinois Route 72 passes through the southern part of the village, leading east 4 miles (6 km) to Starks and west 8 miles (13 km) to Genoa.
According to the 2010 census, Hampshire has a total area of 8.95 square miles (23.18 km2), all land.
17.5% of all households were made up of individuals, and 7.6% had someone living alone who was 65 years of age or older.