McDonnell said the 14-year-old suspect had fired multiple gunshots in a courtyard but did not elaborate on whether the teen was aiming for anyone in particular.
"We are incredibly grateful for the actions of Highland High School teachers and staff and our first responders who courageously protected the lives of our students today", Brett Neal, an assistant superintendent for the school district, said in a statement.
Santa Clarita Valley Sheriff's Office deputies were searching the grounds of Highland High School in Palmdale, Officer Nicole Nishida, spokeswoman for the Los Angeles County Sheriff's Office, told ABC News. The footage was shot by Jon Baird of KNX1070 Newsradio, who told Storyful that deputies had confirmed the boy in the vehicle had been detained in connection with the shooting.
The suspect has been charged with one count of attempted murder, McDonnell said.
The sheriff's department says deputies searched the school and found no evidence of a crime.
Investigators say the shooting stemmed from a dispute between the shooter and the victim, but are still trying to pin down the exact motive. The sheriff's office said a boy had been shot in the arm at the school and was in stable condition at a local hospital.
A warrant was served at the boy's home about 11 a.m., McDonnell said.
Ronaldo Will 150% Be Fit for Champions League, Promises Zidane
He added: "And then we have the traditional teams of Europe, but I believe Spain is once again a real team". However, no one can fully repel the march of time, no matter how expertly they look to adapt with it.
The high school was being searched by dogs trained to detect explosives, law enforcement sources told ABC News, as sheriff's deputies worked to calm anxious parents who had come to the school after social media reports of a shooting.
The FBI and agents from the Bureau of Alcohol, Tobacco, Firearms and Explosives also responded to the scene.
It wasn't clear Friday afternoon if the shooting happened outside or inside the school. The campus was then placed on lockdown and students were told to shelter in place, McDonnell said.
A person was detained after deputies responded to a report of a man with a gun at Highland High School, which is about 7 miles (11 kilometers) away.
The shooting prompted an immediate lockdown at the school.
"It's scary, I don't know what to feel", Ana Salazar told KTLA.
Firefighter-paramedics told NBC Los Angeles they received a report of one person with a gunshot wound, though any injuries couldn't be independently confirmed.
The deadliest school shooting this year was on February 14, when a former student killed 17 students and staff at Marjory Stoneman Douglas High School in Parkland, Florida.