"A psychiatric evaluation will be made as soon as possible," the prosecutor's office said.
The 45-year-old man will not return to the school in Aubervilliers, northeast of Paris, the education ministry said.
The teacher had claimed that a man in overalls and a balaclava burst into his classroom early on Monday, grabbed a box cutter and scissors that he found in the room, and attacked him.
In the immediate aftermath of the incident, security was raised at schools and Education Minister Najat Vallaud-Belkacem visited the institution concerned.
More From This Section
But later yesterday, prosecutors said the man had admitted inventing the story and cutting himself on the neck and side.
Police were said to be sceptical from the start about the claims of jihadist involvement, but with France on edge a month on from the coordinated attacks by IS that killed 130 people in Paris, the investigation was immediately taken over by anti-terrorism prosecutors.