The boy is charged with unlawfully possessing noxious material after allegedly spraying it in a hallway at Northern Parkway School in Uniondale on Wednesday.
Parents came running from every direction to pull their kids out of school when they heard about what happened.
NewsCopter 7 was over the scene as several of the 20 students and four adults were treated. Authorities said most of the victims suffered from eye and throat irritation.
"My eyes were burning and my throat was hurting," said Carlos Molina, a student.
"I was in the line, I was coughing, I was scared that something was going to happen to me," said Fernando Moreno, a student.
Officials at the Uniondale School District say a 5th grader at the elementary school released the pepper spray.
Eyewitness News saw police taking away a boy and his mother to police headquarters.
"Can you all please go away, can you all please go away, you're scaring my child," the mother said.
The boy was later custodialized and charged before being released to a family member. He is scheduled to appear in court next month.
Students were allowed back into the school about 30 minutes later.
"We had county hazmat here they got a zero reading. There was no sign of haze or smoke in the building," said Chief John Skelly, of the Uniondale Fire Department.
But the students weren't back in there too long before dozens of parents came running to pull them out for the rest of the day.
"Just precaution. She hasn't smelled anything yet but I don't want anything to happen you know," said Tammy Ricks, a parent.
"What went through your mind when you heard this?" Eyewitness News asked.
"Oh terrible. I think the bad things," a parent said.
"My sister couldn't get on the phone with them. There was no one picking up, nobody saying anything," said Harry Roland, a Uniondale resident.