The discovery was made at Elmont High School, located at 555 Ridge Road in Nassau County, around 1:50 p.m., according to Nassau County Police.
Fifth Precinct officers responded to the school following a 911 call, detectives said.
A switchblade knife was recovered from inside the student's backpack, and school staff detained him until police arrived, according to investigators.
The student, identified as Dayvion Campbell, 18, of Elmont, was taken into custody without incident, police said.
Campbell was charged with fourth-degree criminal possession of a weapon.
He was released on an appearance ticket and is scheduled to appear in the Youth Section of First District Court at a later date, according to police.
Authorities did not say how the knife was discovered or whether any threats had been made.
No injuries were reported in the release.
Click here to follow Daily Voice and receive free news updates.