Police do not believe the victim was the intended target, and he ran into the high school for help after he was wounded.
The school was briefly locked down as a result.
Surveillance video shows the suspects on a scooter when one opens fire.
ALSO READ | NYPD officer out of hospital after being shot in the Bronx
Authorities say another teen with whom the victim was walking on Grand Avenue, who detectives believe was the target, was able to provide them with the identity of the suspect.
Detectives went to that boy's Queens home and picked him up Wednesday night.
They had previously detained two other 15-year-olds for questioning, but they were later released and it was determined they were not involved in the shooting.
The 15-year-old, whose identity is not being released due to his age, is charged with attempted murder, assault, criminal possession of a weapon and reckless endangerment
The victim is a student at Maspeth High School, where portable metal detectors arrived Thursday morning.
There was no scanning at the school Wednesday.
He was treated at Elmhurst Hospital for a non life threatening injury to his left arm.
ALSO READ | Couple wakes up to find strange dog sleeping with them in their bed
The shooting comes as city officials continue to raise concerns about ghost guns, with Mayor Eric Adams asking the federal government to target one gun manufacturer in particular as part of a crackdown on untraceable weapons.
"We've never experienced the level of total disregard and fearlessness of carrying a gun and using a gun," Adams said. "I've never witnessed anything like this. There's a real energy out there that it is all right to carry and use a gun because nothing is going to happen to you. That's a big mistake."
The fear is the number of shootings will increase as summer weather arrives and temperatures across the city rise.
* More Queens news
* Send us a news tip
* Download the abc7NY app for breaking news alerts
* Follow us on YouTube
Submit a News Tip