New Zealand troops will be withdrawn from Afghanistan by May 2021.
The current deployment consists of six Defence Force personnel - three deployed to the Afghanistan National Army Officer Academy, and three deployed to the NATO Resolute Support Mission Headquarters.
Prime Minister Jacinda Ardern said after 20 years it was time for the New Zealand Defence Force to leave Afghanistan.
"The deployments to Afghanistan have been one of the longest running in our history, and I wish to acknowledge the 10 New Zealanders who lost their lives in the line of duty, and the more than 3500 NZDF and other agency personnel, whose commitment to replace conflict with peace will always be remembered," Ardern said.
Foreign Affairs Minister Nanaia Mahuta said while the environment remains complex, the intra-Afghan peace process gives Afghanistan the best chance of an enduring political solution.
"New Zealand will continue to be supportive of the Afghan government and its people in the years to come, including as they work through the intra-Afghan peace process in an effort to resolve the decades-long conflict," Mahuta said.
New Zealand's decision to conclude its deployment in Afghanistan was discussed with "key" partners, Mahuta said.