Lucerne cantonal police said they were alerted when an automatic fire alarm in the KV Luzern school in Landsberg, northwest of the city of Lucerne, went off at 5.15am.
Fire department officials found the dead body of the teacher on the first floor of the school with severe burn injuries, police said.
An investigation has concluded the man took his own life by self-immolation.
The man had quit his job at the vocational school at the end of January and transferred to KV's vocational academy, the 20 Minuten newspaper reported.
“He was a teacher who worked for us for many years,” Esther Schönberger, rector of the KV Luzern vocational school told the daily.
“We are sad and deeply concerned about this incident,” she said.
“We also think about the family he leaves behind.”
A care team provided psychiatric counselling for the teacher's colleagues and students.
Classes were cancelled on Monday at the KV schools following the incident and a commemorative book and candle will be made available on Tuesday for mourners to pay their respects, 20 Minuten said.
The vocational school trains students in the commercial and retail trades, while the academy offers business courses in finance, marketing, leadership and computer science, among other subjects.