Police released a picture of the airsoft gun, which looks like a real gun.
The NYPD says it was taken off a student at P.S./I.S 208, located at 74-30 Commonwealth Boulevard.
The student was issued a juvenile report.
No one was injured.
The NYPD said in a Tweet: "There is no good reason for anyone to bring something like this into a school facility. No weapons allowed in schools. Period."
ALSO READ | Newark school children get free books through Disney's 'Magic of Storytelling'
* More Brooklyn news
* Send us a news tip
* Download the abc7NY app for breaking news alerts
* Follow us on YouTube