The victim, identified as 15-year-old Chance Jackson, was airlifted to a nearby hospital. Family members say he's in stable condition.
The gunfire broke out just at Martinsville West Middle School just after 7 a.m. The suspect was taken into custody about an hour after the incident, and police believe he acted alone.
There's no official motive, but there is speculation the shooting stemmed from a dispute that started last weekend at a school dance.
It is unclear why the student was expelled.
Classmates told The Associated Press that Jackson and the shooting suspect had a volatile relationship and had argued before.
The Associated Press contributed to this story.