"They attacked him from different directions as he came out of our field office in Kacha Gari refugee camp and he was hit several times in the crossfire," Amena Ali Kamal, a UNHCR spokesperson said.
It is not yet known who carried out the attack - the third killing of a UNHCR worker in Pakistan in the last six months.
Mahmood Shah, a former security chief for Pakistan's northwest tribal regions, said Thursday's attack could have been carried out by criminals rather than the Taliban, because fighters had largely been forced out of that area.
'Unacceptable attacks'
Antonio Guterres, the UNHCR chief, said there was "no justification" for attacks on aid workers.
"It is unacceptable that humanitarian workers doing such vital and selfless work are attacked in this way," he said.
"There is no justification for attacks on humanitarian workers dedicated to the protection and care of the most vulnerable people."
The UNHCR is one of a number of agencies providing relief to more than two million people displaced by fighting between security forces and Taliban fighters in the northwest, including the Swat valley.
Fighers have previously targeted foreign diplomats and aid workers Peshawar.
Last month a suicide bomb attack hit a hotel in the city, killing at least nine people, including two UN workers.