Another student who was aware of the weapon reported it to a school administrator.
The Durham County Sheriff's County Office was called to the school, at 117 Tom Wilkinson Road, and arrested the 15-year-old student.
He faces a year-long suspension from school and criminal charges of possession of a weapon by a minor, possession of a handgun by a minor, possession of a stolen gun, carrying a concealed weapon, communicating threats, disorderly conduct and resisting arrest.
Because the accused is a minor, authorities did not release his name.
The sheriff's office said the gun had been stolen from a home in Durham County in June.