Madison County is a county in the U.S. state of Illinois. It is a part of the Metro East in southern Illinois. According to the 2020 census, it had a population of 264,776, making it the eighth-most populous county in Illinois and the most populous in the southern portion of the state. The county seat is Edwardsville, and the largest city is Granite City.