The teen was arraigned on charges of murder in the second degree and criminal possession of a weapon.
The judge ordered him remanded and returned to court on September 29.
"Losing a 13-year-old to gun violence is tragic under any circumstance. As alleged, what should have been another day for school turned deadly when the defendant pulled out a gun and fired into the 13-year-old victim's head. This decision not only took the young victim's life but now has severely altered the defendant's future. This case is an example of the senseless gun violence that endangers public safety and takes the lives of too many of our children," said District Attorney Katz.
If convicted, the teen faces up to 25 years to life in prison.
Mayor Eric Adams had previously said that the motive was an ongoing gang dispute.
The family of 13-year-old spoke outside Cohen's Children's Hospital on Wednesday, announcing that Samuel had died.
Police say the high school freshman was hanging out in a Dunkin' parking lot with his friends on Monday morning when someone rolled up on the group on a scooter and immediately sparked an argument. A fight ensued, with the victim throwing punches at the person of interest, who allegedly pulled his weapon and fired a shot, hitting the 13-year-old in the head.
Surveillance video showed a boy running into a deli, appearing to tell other kids what happened. They come outside, stunned and upset.
Detectives also recovered surveillance video that they said indicates the shooting was targeted.
* Get Eyewitness News Delivered
* Follow us on YouTube
* More local news
* Send us a news tip
* Download the abc7NY app for breaking news alerts