Officials said the gun went off from inside a backpack, critically injuring two students on Tuesday.
The suspect is scheduled to be arraigned on Friday. Prosecutors also filed a motion to have the minor tried as an adult.
The teenager faces stiff penalties if convicted on the two felony charges. He could get as many as seven years in state prison if he is tried as an adult.
Investigators said two more students have been arrested in connection with the shooting. They're accused of helping the suspect hide and get rid of evidence.
"I knew he had the gun, but he's not the type of person that take the gun out and shoot somebody," said senior Tonika Dumas.
Many students at Gardena High said they knew the suspect had a gun, but they didn't want to be a snitch.
Police said people who want to report a weapon or any contraband can call the tip line at (800) 954-4357. Callers can remain anonymous.
Meantime, the conditions of the two victims are improving. The 15-year-old girl who was shot in the head is making progress. She remains in critical condition, but is more awake and can move her arms and legs.
The 15-year-old boy who was shot in the neck has been released from the hospital. The bullet missed his arteries and spine.