School officials say the boy shared that he had a gun in his backpack with fellow students earlier in the day.
One of those students notified an administrator who pulled the boy to the side, searched his backpack, and found an unloaded 25-caliber handgun.
The boy was turned over to police.
Letters were sent home with students about the incident and the boy faces expulsion.
Click here to get the latest Philadelphia news and headlines from across the Delaware and Lehigh valleys.