Zaakir McClendon pleaded guilty to two third-degree murder charges.
He was one of the suspects in the deadly shooting of 14-year-old Nicolas Elizalde outside of Roxborough High School in September 2022.
The other shooting killed 16-year-old Nafis Betrand-Hill, in April 2023 in North Philadelphia.
Investigators say his DNA linked McClendon to evidence that was recovered at the Roxborough scene.
McClendon will be sentenced in September.