From about 1810 to 1858 there were two political parties, Democrat and Whig. The Democratic Party controlled most of the country politically. The Whigs were in steep decline and offered no viable opposition.
The Northern Democrats did not want blacks in the North and enacted many laws barring them from settling in Northern states, Illinois included. The Illinois abolitionist newspaper editor Elijah Lovejoy was murdered by a pro-slavery mob in Alton.
Democrats passed the fugitive slave laws requiring law enforcement to capture and return runaway slaves to their masters.
The Democratic Party opposed the Civil War and was in favor of letting the Southern states secede. During the war, Democrats in Indiana and Illinois known as Copperheads actively worked to stop the fighting and let the Southern states have their independence.
Toward the end of the Civil War, the Republican-controlled Congress passed the 13th Amendment abolishing slavery with only four Democrats supporting. After the Civil War, Presidents Andrew Johnson and U. S. Grant stationed U.S. soldiers in the Southern states to restore order and suppress the Ku Klux Klan.
The Klan terrorized and murdered freed blacks and their white supporters. The Klan got its power because of Democratic majority legislatures in the Southern states, which passed those Jim Crow laws that disarmed freed blacks.
By the way, Democrats continued to control those legislatures through the 1960s and 70s and still control some of them. It was Democrats who turned the fire hoses and the police dogs on blacks trying to assert their rights.