A 30-year-old woman also sustained minor injuries but is understood not have a gunshot wound.
Sergeant Edward Bernal of the Los Angeles School Police Department said the suspect, a female student, was arrested at the scene and is now in custody.
An aerial view of the school
LAPD Officer Meghan Aguilar said a firearm had been recovered from the scene.
The campus remained on lockdown officers cleared a second-story classroom at the middle school.
Authorities said that the lockdown and frisking of students was a precaution and that they did not believe there was another shooter.
A student is led away from scene of school shooting
Video footage from a helicopter showed LAPD officers escorting a young female in handcuffs to a squad car.