North Korean barred Malaysians from leaving Tuesday, prompting a tit-for-tat response from Kuala Lumpur as diplomatic tensions soared over the investigation into Kim's murder with the banned VX nerve agent at Malaysia's main airport last month.
"The staff members are international civil servants and not representatives of their national government," the UN agency said in a statement, adding that the pair, who worked on WFP food programmes in North Korea, had now arrived in Beijing.
"The government will do everything possible to ensure that our citizens continue to be safe and will be able to return to Malaysia," he said in a statement.
But Malaysia will not allow North Koreans to leave the country and "will not relent from our firm approach," Najib added.
More From This Section
The government has urged all mosques to hold special prayer sessions from Friday "until this political turmoil is over".
The police chief has said he believes the other three are hiding in North Korea's embassy in Kuala Lumpur.
Last week, police released the only North Korean they had arrested for lack of evidence.
Experts have suggested Pyongyang is using the travel ban as leverage to try to prevent the arrest of key suspects holed up in its embassy.
An autopsy revealed that VX nerve agent, a substance so dangerous it is classed as a weapon of mass destruction by the UN, was used to kill Kim, the half-brother of North Korean leader Kim Jong-Un.
Police say he suffered a seizure and died less than 20 minutes later.
The diplomatic dispute erupted last month when police rejected North Korean diplomats' demands to hand over Kim's body.