The suspect was later arrested.
He had tried to rob a man who was on his way to work, but the magazine of his gun fell out.
The man then turned on him and fought back.
The 19-year-old suspect then turned and ran for his life.
"A 19-year-old suspect gave new meaning to the phrase 'robbery gone wrong' this morning," Metro Police spokesperson Zelda Martin said.
"He tried to rob a 21-year-old man who was heading to work along Robert Sobukwe Road in Bonteheuwel, but the magazine fell out of the firearm and the victim fought back.
"The suspect ran away and the victim and two bystanders gave chase.
"Metro Police officers en route to work spotted the commotion and stopped to assist.
"The victim explained what happened and handed the suspect over for arrest.
"Officers also recovered a firearm with one round of ammunition lodged in the chamber.
"The suspect was detained at Bishop Lavis SAPS on charges of possession of a prohibited firearm and ammunition as well as armed robbery," Martin said.