Comrades carried the seven coffins draped with the French tricolour flag into the church under Les Invalides military hospital's famous golden dome for a religious ceremony after they arrived in Paris on Monday evening.
Prime Minister Francois Fillon, MPs from across the political spectrum and the military top brass attended, with firemen turning out under driving rain and unseasonally cold weather to pay homage as the cortege drove past.
"You did not die for nothing. Because you sacrificed yourselves for a great cause. You defended our country's most beautiful values," Sarkozy said at Les Invalides, where Napoleon is buried.
The soldiers were killed in three separate incidents over four days in Kapisa province, around 60 kilometres northeast of Kabul.
Five soldiers, aged 27 to 38, died along with an Afghan civilian in a suicide attack on July 13, the worst loss of life for French forces since August 2008, when 10 soldiers were killed in a Taliban ambush east of Kabul.
A French navy commando was killed by insurgents on July 14 during an operation alongside Afghan police in Kapisa, while another soldier lost his life in a friendly fire incident.
That brought to 70 the number of French soldiers who have died in Afghanistan since 2001, when they deployed to support the US-led campaign to overthrow the Taliban regime and hunt Al-Qaeda militants.
Around 4,000 French troops are serving in Afghanistan, most in Kapisa, and Sarkozy has said all will be withdrawn by 2014.
The deaths came during the week that France celebrated its national Bastille Day, notably with a military parade on July 14.
Even before the latest bloodshed, opinion polls showed that barely a quarter of voters backed France's role in the conflict.
While Sarkozy insists that no French "combat units" will remain there after 2014, his likely rivals in next year's presidential election are now urging him to speed up the withdrawal of French forces.