The suspect was seen running out of a business with a gun in his hand in the 700-block of East 83rd Street at about 2:22 a.m. when police said they began to pursue him.
As the suspect was running westbound on 83rd Street when police said he turned around and began firing at a squad car.
Officers returned fire and the suspect was taken into custody. No one was injured in the incident, police said.
A handgun was recovered from the scene and detectives are investigating, police said.