All of Palmdale School District's campuses were on lockdown "until the situation is confirmed as safe for our students, teachers staff and parents", Maldonado said.
He says one student was shot in the arm and the shooting stemmed from a dispute between the shooter and the victim.
A rifle was found a "distance away" in the desert, officials said.
Deputies detained a 14-year-old boy Friday morning after he allegedly shot another Highland High School student in the arm.
Authorities say they caught a 14-year-old suspected of shooting a former classmate at a California high school after the boy called his father to say he fired his gun in the air and was headed to a grocery store near campus.
Los Angeles County sheriff's Capt. Darran Harris tells KTTV Friday that the student was taken into custody and a gun was recovered at the scene.
The Los Angeles County Sheriff's Department tweeted that the victim was hospitalized and in stable condition, and that the suspect was a male juvenile. The weapon used, an SKS rifle, was found discarded in a field, McDonnell said.
Authorities said the shooting appeared to be random but have not revealed the motive.
"He looks back at me and tells me to run", he said.
Highland High student Katharina Smith, 16, said she was driving to the school when she saw "a ton of police racing toward school". "Thankfully we only had one child that was shot". "And I'm locked up in one of the buildings now'".
Students wait on a curb outside Highland High School in Palmdale as Sheriff search the campus on Friday, May 11, 2018. While police searched for the suspect and secured the area, the school was on lockdown.
Friday's incident comes during a time when gun control and school safety has been a national hot topic since the Parkland shooting on February 14.
Johnny Lewis Sr., whose 17-year-old son is a student at the school, told the Los Angeles Times that he never thought he would experience a school shooting.
Lydia said she then heard two gunshots before she and her mom drove away.