James Randall Monroe of 5474 Lazybrook Court, Fayetteville was arrested shortly before 11:00 a.m. on Wednesday.
Deputies say they found a BB gun and five bottles of alcohol under the front seat of Monroe's 2006 Grand Vitera Suzuki. The car was parked along the front section of Seventy First High School on Raeford Road when the items were discovered.
Monroe, who is a senior at the school, is charged with possession of a weapon on school property and possession of alcohol by a person under the age of 21. Both are misdemeanor charges.
He was placed under a $500 secured bond and was released from the Cumberland County Detention Center. His first court appearance is scheduled for February 27.