The suspect, a student from the school, was detained after a search that involved hundreds of officers, police said.
They did not reveal the suspect’s age or provide details about the teacher who died. Nobody else was injured, and a machete was found at the scene, police said.
Education Minister Petr Gazdik said the slaying likely resulted from a conflict between the teacher and the student. He gave no more details.
“It’s something that should have not happened,” Gazdik said. He offered condolences to the victim’s relatives.
The school said it will remain closed on Friday and that psychologists were available to work with other students.
Violent attacks are rare at Czech schools.
In 2014, a woman fatally stabbed a student with a knife and injured three other people at a high school in the town of Zdar nad Sazavou. She was later diagnosed with a mental illness.