The Tulare County Sheriff's Office says deputies responded to Oak Valley School around 2:30 pm, where they discovered the gun in the teen's backpack.
Detectives say the boy had allegedly threatened another person at the school before he was arrested.
Investigators searched the teen's Tulare home where they found more firearms.
No one was injured.
Officials are asking anyone with information to call the Tulare County Sheriff's Office.