The cabbie, 66, who was not identified by name, felt threatened after he drove his fare to an empty lot on 17th Street at about 9:40 p.m., police said.
His passenger, Donald Canham, 41, of 92 Prentice Rd., Levittown, had given him inaccurate directions and had asked how much money he had on him before directing him to drive to the lot, police said.
The driver left the cab and tried to call 911 when Canham "charged him and struck him about the head multiple times with an unknown object," police said in a news release.
The driver identified himself as a former law-enforcement officer, pulled a licensed handgun and ordered Canham not to move, police said.
When Canham charged again, the driver fired and hit him in the leg, police said.
Police responded, and both the driver and suspect were taken to a hospital. The driver was treated for a head injury and released; the suspect was admitted with a non-life-threatening gun shot wound.
Canham is charged with second-degree assault and will be arraigned when it is "medically practical," police said.
A police spokesman Thursday declined to identify the law-enforcement agency from which the officer had retired.