A 29-year-old teacher died after an attack at a private school in Faridabad, Haryana, on 4 August.
She was taken to Al Falah Hospital, where doctors declared her dead.
The incident accounts say she was stabbed 34 times in about 30 seconds.
Witnesses said a masked attacker was using a knife when people came outside after hearing screams.
CCTV footage shows a man entering the school, signalling for the teacher to come outside and then attacking her, the accounts state.
An administrative official who tried to intervene was confronted by the attacker, who then left on a motorcycle without a number plate, the footage shows.
Police arrested 21-year-old Amit within two hours of the incident.
Police said their preliminary investigation indicated that the suspect, a resident of Kot village, had previously harassed the teacher.
Police said the teacher had recently filed a complaint over the alleged harassment and that the suspect had publicly apologised.
Police further alleged that he confessed to acting out of resentment, an allegation that has not been tested in court.