The incident happened at 3:14 p.m. at Clarkson Avenue and East 95th Street, sources told FOX 5.
Police say the teen took off on a scooter before the shots were fired.
According to the NYPD, officers observed a group fighting and hey say they broke up it up.
A female was taken into custody and a male fled on that razor scooter.
They say the shots were fired shortly after officer observed the teen was armed.
"Drops a 9 mm purple firearm, as the male goes to pick up the gun ... now face to face with our officers ... he is given repeated instructions not to pick up that firearm. At which point he does our officer to defend himself fires one round right to the thigh," NYPD Chief of Patrol John Chell said.
The teen was taken to a nearby hospital and is expected to be OK.
Police also told FOX 5 the encounter between the officer and the 17-year-old was all caught on body-cam.
The investigation remains ongoing.