The 9mm automatic was taken from the student inside Long Island City High School on Monday morning.
The weapon was found after another student informed administrators.
The education department released the following statement:
"The safety and wellbeing of our students and staff is our top priority. Weapons are not tolerated within our schools, and this item was quickly recovered without incident by our dedicated school staff and NYPD's school safety agents. All students and staff are safe. We are offering additional security and supports to the school community today and in the coming days and are working closely with the NYPD regarding follow-up actions."
He is being questioned by police and no charges were immediately filed.
Eyewitness News is tracking crime and safety across New York City and in your neighborhood
----------
* More Queens news
* Send us a news tip
* Download the abc7NY app for breaking news alerts
* Follow us on YouTube