Hamilton County is a county located in the U.S. state of Illinois. As of the 2020 census, its population was 7,993. Its county seat is McLeansboro. It is located in the southern portion of the state, known locally as "Little Egypt".