The French counterterrorism prosecutor said he was investigating the attack, which took place in Conflans-Sainte-Honorine, a suburb northwest of Paris.
President Emmanuel Macron arrived at the scene on Friday evening, a live Reuters feed showed.
French channel BFMTV reported that the attacker was 18 years old and born in Moscow.
The murder echoed the attack five years ago on the offices of satirical magazine Charlie Hebdo after publishing caricatures of the Prophet Muhammad, triggering an issue that still casts a veil on French society.
Less than a month ago, a man from Pakistan used a meat cleaver to attack and injure two people on a cigarette break outside the offices where Charlie Hebdo was based at the time of the 2015 attack.
A police source said witnesses to Friday’s attack heard the assailant shout “Allahu akbar” or “God is great”. The police spokesman said the information was being verified.
Another police source also said the victim was beheaded in the attack, but this has not been confirmed. The attack took place in the street in front of the college where the victim worked.
“Tonight, it is the Republic which is attacked with the despicable assassination of one of its servants, a teacher”, wrote on Twitter the French Minister of Education, Jean-Michel Blanquer.
“Our unity and determination are the only answers to the monstrosity of Islamist terrorism. ”
A Twitter thread published on October 9 contained allegations that a history teacher in Conflans-Sainte-Honorine showed students cartoons claiming to represent the Prophet Muhammad.
The thread contained a video of a man saying his daughter, a Muslim, was one of the students in the class and that she was shocked by the teacher’s actions.
The man in the video urged Twitter users to complain to authorities and have the professor removed from his post. Reuters was unable to independently verify the authenticity of the video.
‘A new threshold’
French Interior Minister Gerard Darmanin said he had set up a crisis center to deal with Friday’s attack.
France has seen a series of violent attacks in recent years by Islamist militants, including the Charlie Hebdo attacks in 2015, as well as bombings and shootings in November 2015 in the Bataclan theater and on the sites around Paris, which killed 130 people.
The issue of the cartoons was revived last month when Charlie Hebdo decided to repost them to coincide with the start of the trial of accomplices in the 2015 attack.
Al-Qaeda, the militant Islamist group that claimed responsibility for the 2015 attack, threatened to attack Charlie Hebdo again after reposting the cartoons.
The magazine said last month that it published to assert his right to free speech and to show that he would not be intimidated by violent attacks. This position has been supported by many leading French politicians and public figures.
Reacting to Friday’s attack in front of the school, Charlie Hebdo wrote on his Twitter account: “Intolerance has crossed a new threshold and does not seem to give in to anything by imposing its terror on our country”.