The injured student, a male, was taken to a hospital but later died of his injuries, the Matthews Police Department said.
Officials said the shooting happened in a main hallway after a fight between the suspect and victim.
Another student was taken into custody, police added.
The conflict between the shooter and his victim began with a bullying incident, according to Charlotte-Mecklenburg Schools Superintendent Clayton Wilcox.
Police advised that there is no further immediate danger at this time and the initial investigation shows this to be an isolated incident. The school's website says that there are 2123 students enrolled in the school.
"Someone asked me how could someone, especially a student, come onto one of our campuses with a loaded gun, and I wish I had an answer to that", Wilcox said.
Keeping firearms out of schools has become an urgent issue across the country since a suspect killed 17 in a shooting rampage at Marjory Stoneman Douglas High School in Parkland, Florida, in February. The school had been placed in lockdown, but that was later lifted as students streamed out, many crying and hugging parents.More news: Sri Lanka President sacks Prime Minister
A North Carolina high school has been put on lockdown after a student shot and wounded a classmate.
Wilcox said "dozens if not hundreds" of students witnessed the shooting before fleeing in panic. The school does not have metal detectors, he said. "What would parents have said to us if we let kids run out and didn't know where they were?"
"I am heartbroken to hear about today's school violence that has taken the life of a high school student in Matthews, and my family is praying for this community".
"We're incredibly sad, and we're sorry for this family", Wilcox said.
Classes were proceeding for students who remained on campus.
According to the National Center for Education Statistics, the deaths included 28 homicides, 17 suicides and two by law enforcement officers who were attempting to make an arrest, suppress a disturbance or maintain order.
Two other police officers, including a school resource officer directing traffic in front of the school, entered the school within minutes, according to Tyrrell.