Police arrested the juvenile, whom they did not identify, and an alleged accomplice, Edgar Palacios, 20, of 225 Sherman Ct., Westbury, on charges of first-degree robbery and criminal possession of a weapon.
Palacios also was charged with menacing.
Each was scheduled to be arraigned Friday at First District Court in Hempstead.
First Squad detectives said Palacios and the youth approached the 36-year-old cabbie for Taxi Fiesta at about 1:10 a.m. on Liberty Street, asking him for a ride.
The cabbie refused, and the youth hit the driver in the face with the pistol, police said.
Both men ran off, police said, but a short time later the victim identified the two men to another driver, who had responded to his colleague's call for help.
The second driver confronted the two, police said, and Palacios pointed the pistol at him.
Both men ran off again, but First Precinct officers found Palacios near Uniondale High School and the youth on Birch Street, police said.
A police spokeswoman said the two are being charged with robbery because they wanted a ride, a service, comparable to a demand for money.
Police said they did not recover a weapon.