Witnesses say the youth entered the Lycée Souiyah El Houari premises and stood in front of the staff room where he doused himself in petrol and used a cigarette lighter.
Several staff and students saw the incident and some fainted, according to the French language newspaper le Quotidien d'Oran.
A member of staff who went to help burnt his hands.
The student is now in hospital where his condition is described as critical.
Fellow students say the youth acted in a moment of desperation after his request to return to the school to retake his exam was refused.