elgin () is a city in illinois in the united states. it is roughly northwest of chicago on the fox river. most of elgin lies within kane county, illinois, with a portion in cook county, illinois. as of the 2010 census, the city had a total population of 108,188. it is the eighth-largest city in illinois and the 241st largest city in the united states. it is part of the chicago metropolitan area.