French troops will resume training Afghan soldiers on Saturday but Paris will pull out most of its troops from the country by the end of 2013, President Nicolas Sarkozy has said.
The withdrawal would come a year earlier than a deadline set by Nato.
Mr Sarkozy had earlier warned of the possibility of a speedy pullout following the killing of four French troops by an Afghan soldier.
He made the announcement after talks with Afghan President Hamid Karzai.
Mr Sarkozy said after the Paris meeting that he had been given assurances that extra protection measures would be put in place.
France currently has about 3,600 soldiers in Afghanistan.
Paris wants to bring home 1,000 of its soldiers this year, leaving only a few hundred after 2013.
The decision has surely been taken with public opinion in mind, the BBC's Christian Fraser in Paris reports.
In a survey published on Thursday, 84% of French people said they supported the full withdrawal of troops by the end of this year.
France has been spending about 500m euros (£420m; $659m) a year in Afghanistan, and the government's commitment in the country is getting harder to defend, our correspondent says.
Mr Sarkozy's main opponent in this year's presidential elections has pledged to bring troops home this year if elected.
Last week, an Afghan soldier killed four French troops in the northern province of Kapisa. Another 16 French soldiers were injured.
"We understand that during a fitness exercise some of our soldiers were suddenly attacked by an Afghan soldier, so they were unarmed," French foreign ministry spokesman Bernard Valero told the BBC.
"They were murdered. It was impossible for them, first of all, to know what was going to happen and secondly to react to this aggression," he added.
The attack brings to 82 the total number of French personnel killed in Afghanistan since 2001.
In response, Paris suspended operations in Afghanistan.