Todd Brown, 14, was shot about 1:45 p.m. and taken by ambulance from Discovery Middle School to Huntsville Hospital, where he died, said hospital spokeswoman Kristen Bishop. She wouldn't release any other details.
The suspected shooter was arrested inside in the school, where police are regularly stationed.
Police did not release the name of the alleged shooter, also a ninth-grader, citing their ongoing investigation. No one else was injured and it wasn't immediately clear what prompted the gunfire.
Police Chief Larry Muncey said the student has been charged with murder. He also referred to rumors that something posted on the Internet may have been connected to the shooting.
"It's hearsay," he said. "We can't build cases on hearsay."
Dee Fowler, the city school superintendent, said churches were working with the school system to offer counseling throughout the weekend and counselors will be at the campus Monday.
He also said local officials, clergy and counselors will discuss the incident with community members at a local high school Sunday afternoon.
"We see this as a time to discuss, reflect and also mourn this tragic event," Fowler said.
Debbie Nalley has two grandsons at the school, including one in the ninth grade who sent a text message to his mother after the shooting.
"He said there was a boy who had his hand in his pocket, and when he pulled it out he shot this other boy in the head in the ninth-grade hall," Nalley said. "It's upsetting for all the kids."
Hannah Mannis told WHNT-TV that she and other students hunkered down in the dark while the school was on lockdown after the shooting. She said someone with Internet access on their cell phone learned there had been a shooting on campus and students started sending text messages to each other throughout the school.