Police say 20-year-old Kevon Ferrell was the man seen on surveillance video opening fire just before 2:30 p.m. at the corner of Bedford Avenue and Carroll Street in Crown Heights.
Right as the shooting began, an unmarked police car in the right place at the right time began pursuit of Ferrell, who dropped the gun and took off running.
The suspect was caught a block away, and officers recovered a handgun at the scene.
Ferrell is charged with criminal possession of a weapon, reckless endangerment and attempted assault.
The motive for the shooting has not been released.