Investigators said Jalyn Marshall was involved in an altercation at Aversboro Elementary, and allegedly went to his vehicle, got a gun, and shot at another person.
No one was hurt.
Marshall was charged with one count of assault with a deadly weapon with intent to kill and one count of possession of a weapon on school property.
Police said they recovered the gun involved.
Marshall was in the Wake County Jail under a $125,000 bond.