Samuel Paty was targeted close to his school near Paris for showing cartoons of the Prophet Muhammad in class. His killer, 18-year-old Abdullakh Anzorov, was shot dead by police.
Speaking at a televised memorial service on Wednesday, President Macron said France "will not give up our cartoons”.
Mr Macron said Mr Paty had tried to teach his pupils how to become citizens. "He was killed precisely because he incarnated the Republic", Mr Macron said.
"He was killed because the Islamists want our future. They know that with quiet heroes like him, they will never have it."
The memorial was attended by the teacher's family and 400 guests.
Mr Paty’s coffin was brought into the ceremony on the shoulders of a guard of honour and to the sound of the song "One" by U2.
On top of the casket was his Legion d'Honneur, France's highest honour, which was posthumously awarded to Mr Paty.
Anzorov decapitated Paty with a large knife on a street in a middle-class Paris suburb in broad daylight last Friday.
Officials called the killing an attack on French values.
The murder carried echoes of the Islamist attack in 2015 on the offices of satirical magazine Charlie Hebdo, after it published cartoons of Prophet Mohammad.
In an act of solidarity, the Occitanie regional authorities projected a series of Charlie Hebdo's past political and religious cartoons, including those of the Prophet Mohammad, onto public buildings in the cities of Toulouse and Montpellier.
Mr Macron said: "Samuel Paty on Friday became the face of the Republic, of our desire to break the will of the terrorists ... and to live as a community of free citizens in our country."
France's anti-terrorism prosecutor said Anzorov had paid pupils at the College Bois d'Aulne to identify his victim, knowing only his name and the school where he taught after a parent launched a campaign against Mr Paty on social media.
"This identification was only possible with the help of students from the school. They identified him in exchange for payment," Jean-Francois Ricard told a news conference.
The prosecutor said the killer had arrived at the school early on Friday afternoon and offered students between 300 and 350 euros. He told them he wanted to force an apology from Paty but also to "humiliate and hit him".
Two students aged 14 and 15 were among seven people detained for alleged complicity to murder in a terrorist endeavour, or association with a terrorist.
They were handed over to a judge to determine whether they should be placed under investigation - at which point they would be treated as formal suspects.
The prosecutor also confirmed that Anzorov had made contact with the school parent who posted videos online accusing Mr Paty of stigmatising Muslims and calling for him to be fired.
The parent was among the seven presented to the judge.