The 57-year-old female sergeant was sitting in her car near North Park and West Hunting Park avenues around 7:30 p.m. Tuesday when police said the man threw a rock into the driver's side window.
Police said the suspect then grabbed the sergeant's neck and tried to drag her out of the car.
Police say the sergeant fired on the suspect, it's unclear if he was struck before fleeing the scene.
Initially, police say they arrested the suspect responsible, but they now say that is not the case.
"The investigation has cleared him of attacking the sergeant but he's remaining in custody because he did break into someone's house," said a police spokesperson.
The suspect in custody did get shot, but not by police, officials said.
A search for the attacker remains ongoing at this time.
The sergeant was taken to Temple University Hospital and treated for cuts and bruises, according to Philadelphia Police Department spokesperson Staff Inspector Sekou Kinebrew.
Kinebrew said the sergeant has 23 years of service on the job.