It happened around 2:25 Saturday morning in the area of 54th and Pine streets.
The victim told the cab driver that he had been shot.
Authorities say the victim suffered multiple gunshot wounds to the leg and an injury to his head.
The cabbie transported him to Mercy Hospital. He was later transferred to the Hospital of the University of Pennsylvania in stable condition.
Police have not released any further information.