The alleged killer was arrested and could be charged with murder and manslaughter. Police said they recovered the knife reportedly used in the attack.
Both boys were students at Joseph Wade Middle School in the Morris Heights section of The Bronx. The victim, Timothy Crump, 14, had been set to graduate Thursday.
On Thursday, an informal memorial grew outside the school where parents would normally have placed messages of congratulations.
Investigators said the boys had apparently been involved in an argument in school. Crump was stabbed just after students were dismissed for the day at 3 p.m.
"The boy came out of the school, pulled out a knife and just started stabbing," a student who witnessed the attack told WNBC-TV.
A neighbor, Tyrone Rivers, described Crump, who lived in a shelter with his mother, as a "great kid."
"It's always the innocent that get taken," Rivers said.
A teacher at the middle school had kind words for the alleged killer: "He is a good kid as far as I'm concerned. I'm trying to find out what really happened."
Witnesses said Crump tried to run and then collapsed. A security guard came to his aid, but he died a short time later at Bronx Lebanon Hospital.
Celebrity Breakups and divorces of 2014 [PHOTOS]