The incident occurred on the campus of Jogeshwari High School and Junior College in Wagholi area.
The teachers--Dhananjay Abnave and Darshan Chaudhary sustained head injuries in the attack by Sunil Bhor, a class 11 student.
"According to the teachers, Bhor, who was indisciplined, was reprimanded two days ago in the classroom by Abnave over his long hair and was asked to attend the classes with a proper haircut.
"On Thursday, Bhor came to the classroom with haircut, but since he was wearing a cap, Abnave asked him to remove the cap or leave the classroom," a police officer said, adding that Bhor left the classroom.
More From This Section
"When Chaudhari rushed to intervene, he too was attacked," he said, adding that Bhor allegedly made casteist remarks at Abnave before fleeing.
Police have booked Bhor under section 307 (attempt to murder) of the IPC and relevant sections of the Scheduled Castes and Tribes (Prevention of Atrocities) Act.
He remains absconding.
Both teachers were rushed to a nearby private hospital, where their condition is stated to be stable.