Kai Eide, the top UN official in the country explained the decision in Kabul on Thursday, a week after five UN personnel were killed in a Taliban attack in the capital.
But Eide, the UN's Special Representative in Afghanistan, said the relocation does not mean the UN is withdrawing its operations in the country.
"Let me emphasise in light of media reports this morning, we are not talking about pulling out, and we are not talking about evacuation," he said.
"We are simply doing what we have to do following the tragic event of last week to look after our workers while ensuring our operation in Afghanistan can continue."
Aleem Siddique, a UN spokesman, said the move will affect 600 of the world body's roughly 1,100 international staff.
"We will be looking as a temporary measure to relocate some staff within the country and some staff outside of the country, while we can secure accommodation, where proper security measures can be provided for staff.