Police were called to Marinette High School at around 1500 (2100 GMT), after the 15-year-old took over a classroom.
All of the hostages were released unharmed after a five-hour stand-off.
The student shot himself after police officers entered the classroom, police said. He was taken to a hospital, and his condition is not immediately known.
Marinette Police Chief Jeff Skorik said no other injuries had been reported.The incident began near the end of the school day, when the male student entered a classroom with two handguns - a .22-calibre semi-automatic and a 9mm semi-automatic - and took the students and teacher hostage.
Hostage negotiating teams were sent in, but the student made no demands and did not provide any sense of why he had done it, Chief Skorik said. All contact was made through the female teacher being held.
Chief Skorik said that at 1940 (0140 GMT), the student agreed to release five of the 23 students because they had to go the the toilet.
Twenty-three minutes later, police officers deployed outside the classroom heard three gunshots, he added.
"At that time, the officers breached the door, entered the classroom and saw the suspect standing in the front of the classroom. As the officers approached him, the suspect fired one shot and injured himself."
The remaining hostages, as well as the teacher, were immediately evacuated.
"All of the students were safely removed from the school and were put on buses and reunited with their families," Chief Skorik said.
Marinette Health and Human Services has mental health counsellors talking with the parents, and the Marinette Schools Superintendent, Tim Baneck, said classes at the school would be cancelled on Tuesday.
"The high school will be closed tomorrow. We, too, will need to regroup and assess the situation, find out more as this investigation continues."
Investigators have interviewed the gunman's parents. Chief Skorik said he did not have any history with the police.