The sheriff's office received an alert at about 11:03 p.m. about a vehicle suspected to be involved in a shooting in Rockford.
The vehicle was later spotted on traffic cameras at Peace and Mercantile Drive and police later found the vehicle pulling into the address it was registered to in DeKalb.
A sheriff's deputy attempted to stop the vehicle, which refused to stop and fled the scene, the sheriff's office said.
Deputies pursued the vehicle, deploying stop sticks to deflate the tires of the vehicle, which came to a stop on Rich Road west of Nelson Road.
The suspect was seen armed with a handgun with two occupants inside the car, the suspect who was armed with a handgun and a hostage, the sheriff's office said.
The DeKalb County Special Operations Team was activated, which includes hostage negotiators, the sheriff's office said.
The hostage was released unharmed after several hours of negotiations, the sheriff's office said.
Negotiations continued with the armed suspect to get the suspect to surrender and after the sheriff's office said the suspect pointed the gun at police and fired, police returned fire, killing the suspect.
Illinois State Police and the DeKalb County State's Attorney's Office have been contacted to conduct an independent investigation.
The car was towed from the scene, completely covered with a tarp, by about 3 p.m. Wednesday.
Rockford police have not confirmed any information about the original suspected shooting that started the chain of events.