The student's family along with local residents reached the private school on Tuesday and thrashed the principal for alleged sexual exploitation of the girl.
Later, they handed over the accused to the police.
Station House Officer (SHO), Machhrehta, Mukesh Verma said the accused, Pramod Yadav, had been booked under the charges of sexual harassment and under the POCSO Act.
The SHO said the family alleged that the principal called the girl in his room and tried to rape her. The girl hit the principal with a paperweight and managed to escape.
The girl is a student of Class 6.
She narrated her ordeal to the family members who later handed over the accused to the police.