McInerney pleaded guilty to second-degree murder, voluntary manslaughter and use of a firearm, according to the Ventura County District Attorney's Office.
The plea deal will give McInerney a sentence of 21 years.
As part of the plea deal, McInerney receives no credit for his nearly four years of incarceration since he was originally arrested. He has no possibility of parole. He is scheduled to be officially sentenced Dec. 19.
McInerney is accused of shooting and killing gay classmate Lawrence King during their computer class at an E.O. Green Junior High School in Oxnard in February 2008. McInerney was 14 at the time of the shooting; King was 15.
Lawrence King's father, Greg King, was present Monday at the announcement.
"I don't think that 21-year sentence is justice for my son," said King. "But I understand the reality that was facing the D.A., trying to convict a defendant who was 14 when he committed the murder."
He was asked afterward if there was closure now.
"No," said King. "And quite frankly, I don't know that there will ever be closure. I'll wake up every morning thinking about my son and I'll go to bed every night thinking about my son. So I don't know that there is such thing as closure."
McInerney was originally tried in August for murder with a hate-crime enhancement. The trial was moved from Ventura County to Los Angeles County.
Ventura County Superior Court Judge Charles Campbell declared a mistrial in the murder trial on Sept. 1 after a jury could not reach a unanimous agreement.
"I think it's an appropriate sentence given all of the circumstances and all the evidence that came out at trial," said defense attorney Scott Wippert. "Obviously we've always been of the opinion that he should have been tried as a juvenile, but that aside, given that he's in adult court, I think that this sentence reflects the sentiments of the jury."
"We acknowledge that other defendants have been and will be tried as 14-year-olds in adult court, but there are certain circumstances in this case that made it very difficult to expect that we would get a significantly different result," said Ventura County Chief Deputy District Attorney Michael Frawley. "So we thought getting 25 years served the community well."
During trial, the prosecution alleged McInerney had planned to shoot King over unwanted sexual advances, and said that McInerney had white-supremacist leanings.
The defense contended McInerney had a violent upbringing in a rough household and that he snapped when King, who was gay, made repeated comments to McInerney.
The nine-woman, three-man jury panel said the last vote resulted in seven in favor of voluntary manslaughter and five for first- or second-degree murder. A conviction could have sent McInerney to prison for 25 years to life.