Around 2:30 am on Saturday, in the Flatlands neighborhood, police say 19-year-old Micheal Magnan tried to hold up a livery cab stopped at a traffic light.
A passenger sitting in the back was shot in the head. He was hospitalized in critical condition.
Magnan has been charged with Attempted murder, Assault, Attempted robbery, Criminal Possession of a weapon, and Criminal mischief.
The driver of the livery cab told Eyewitness News that the suspect pulled a gun and demanded money from the driver and his two passengers.
The driver then punched the robber and took off, but the suspect shot into the car as it was fleeing the scene, hitting the 23-year old passenger.
Magnan then ran into a nearby club to try and hide. The suspect was caught when a bouncer flagged down an officer.
The man's sister, who was sitting next to him, was not hurt, and neither was the driver.
The wounded man was rushed to Kings County hospital, where he's listed in critical condition.
The driver said he had picked up the two passengers on East 56th Street for a ride to Downtown Brooklyn.
WAKE UP WITH EYEWITNESS NEWS! Click here to download the WABC Eyewitness News Alarm Clock app from iTunes. or search WABC or 7online in the app store.
Get Eyewitness News Delivered