Police say the officer was running after a suspect who fled after a traffic stop at 79th Street and South Shore when his gun went off early Monday.
Fraternal Order of Police spokesman Pat Camden says the car the suspect was driving eventually hit a chain-link fence and lurched back toward the approaching officer. Camden says that's when the officer accidentally shot himself while trying to get out of the way.
The officer is going to be OK.
Two suspects were in custody Monday.
(The Associated Press contributed to this report.)