The shooting occurred on the 1800 block of South Evergreen. Police said the two detectives were on gang enforcement duty and were driving up the street when a man shot at them.
The detectives were not hurt and ran after the suspect. Police said there was a confrontation and the man was shot.
The suspect was hit and transported in an unknown condition. No officer was seriously injured in the incident.
A gun was recovered, police said.
The confrontation prompted an investigation into the shooting.