It occurred around 11:40 a.m. Tuesday at William Penn High School on the 700 block of East Basin Road.
According to police, a school resource officer was alerted to a gunshot inside a second-floor restroom.
The building was placed on lockdown for about an hour while investigators searched the building. The school was then closed for the remained of the week.
Investigators canvassing the area discovered a Glock handgun outside the school.
The teen is facing felony reckless endangerment and weapons charges. He's being held on $98,000 cash bond.
No injuries were reported.