Macoupin County is a county in the US state of Illinois. In the 2000 census the county had a population of 49,019 inhabitants. It is part of the Greater San Luis area. The county seat is Carlinville. The county was formed on January 17,1829 from the counties of Greene and Madison. It was named after Macoupin Creek, a stream that passes near Carlinville and empties into the Illinois River.