Hamilton County is a county in the U.S. state of Illinois. According to the 2010 census, it has a population of 8,457. Its county seat is McLeansboro. Hamilton County was founded in 1821 and named for Alexander Hamilton, Revolutionary War hero and the first United States Secretary of the Treasury.