T.J. Lane, now 18, also pleaded guilty to two counts of attempted aggravated murder and a single count of felonious assault.
Prosecutors agreed to drop the possibility of the death penalty, and Lane likely will be sentenced to life in prison. Sentencing was set for March 19.
Dressed in a green open-collared shirt with close-cropped hair, Lane answered "yes" or "yes, your honor" to questions from the judge about the plea agreement.
Prosecutors say Lane fired 10 shots at students in a cafeteria at Chardon High School, east of Cleveland.
Lane, who was 17 at the time of the shooting, was prosecuted as an adult. His appearance in a Geauga County courtroom came one day before the anniversary of the deadly shootings.
Both the defense and the prosecution had sought court-ordered psychiatric testing for Lane to determine if he would be competent to stand trial.
Before the case went to adult court last year, a juvenile court judge ruled that Lane was mentally competent despite evidence he suffers from hallucinations, psychosis and fantasies. He withdrew his plea of not guilty by reason of insanity on Tuesday.
Investigators say he admitted shooting at students but said he didn't know why he did it. Prosecutors say Lane took a .22-caliber pistol and a knife to the school on Feb. 27, 2012, and fired the group of students in the cafeteria.
Lane attended an alternative school for students who haven't done well in traditional schools. He was at Chardon waiting for a bus.
More Nation & World Headlines
Trump barred from conservative gathering after latest barb FBI to assist in probe of Texas football player’s death GOP steels itself for uncertainty in White House race Police chief: Woman armed with knife shot by officer Nagasaki marks 70th anniversary of atomic bombing Injured father of toddler killed in West Bank arson dies NYC sees surge in synthetic pot use, with dire consequences Activists: Hundreds of Syrian Christians flee Islamic State
Our new comment system is not supported in IE 7. Please upgrade your browser here.