The New Zealand Provincial Reconstruction Team will be return to New Zealand from Bamiyan Province by the end of April next year.
Foreign Affairs Minister Murray McCully and Defence Minister Jonathan Coleman confirmed Cabinet have signed off on the date of withdrawal.
The Ministers say the announcement comes after months of planning and is part of an international response for transition out of the region - dubbed International Security Assistance Force (ISAF).
Local Bamiyan forces will take over responsibility for security in Bamiyan by October .
"Today's announcement is a milestone in New Zealand's decade of involvement in Afghanistan,'' said Dr Coleman.
'Over its 10-year deployment, the New Zealand PRT had contributed to international counter-terrorism efforts, improved security, and the development and governance of Bamiyan province.
'Our success is reflected in Bamiyan's position as a leader in the transition process,'' said Dr Coleman.
"We should not underestimate the challenges Afghanistan will continue to face. We should also acknowledge the courage and sacrifice of those who have lost their lives while on active service in the province.''
He said the timetable announced today had taken weeks of careful logistical planning.
The news that Bamiyan airport will not be available to Hercules flights after April next year had pushed the date of withdrawing New Zealand troops forward.
"We will continue to support Afghanistan to ensure the progress made by the international community is sustained. New Zealand's legacy in Afghanistan depends on this,'' he said.
Mr McCully said New Zealand's support to Afghanistan after the PRT's withdrawal will likely include the contribution of a small number of NZDF trainers to the Afghanistan National Army Officer Training Academy later in 2013.
A high number of casualties of New Zealand troops prompted calls for an early withdrawal.
New Zealand lost five soldiers in two incidents in August.
Five Australian troops were also killed last week.
Australian Prime Minister Julia Gillard has refused to change their 12-18 months withdrawal timetable.
Prime Minister John Key has been signalling the early withdrawal from Afghanistan, but a formal decision on when in April New Zealand troops would return had to be signed off by Cabinet.
- By Kate Shuttleworth