A learner died after the hostel at the Tyelimhlophe Agricultural School in Mount Frere was engulfed in flames on Friday.
Eastern Cape Education department spokesperson, Loyiso Pulamani, says the principal received a call from the caretaker at around 08:15, informing him that the hostel was on fire.
He says most of the learners were already at school, but the girl, whose identity is unknown at this stage, was feeling sick and stayed behind in her dorm room.
Police Capt Raphael Motloung says it is alleged that the 17-year old was locked inside the school's hostel by the matron, because she was too sick to attend classes.
He says the hostel building was reduced to ashes.
The cause of the fire is not known.