The incident happened at P.S. DuPont Middle School in Wilmington.
Police say students alerted teachers about the gun, who then called police.
The teen allegedly told police he thought it was a BB gun and brought it to school to show to friends.
According to investigators, the teen did not make any threats.