The incident happened Tuesday morning at Union Pines High School in Moore County.
The Fayetteville Observer reported (http://bit.ly/pIryXS) the student's name has not been released because of his age.
School officials described the assault as an ambush style attack on 43-year-old Officer Stephen Clark. He was not injured.
The student is charged with assault with a deadly weapon with intent to kill, assault with a deadly weapon on a law enforcement officer, possessing a weapon on school grounds, and damage to school property.