UN spokesperson Stephane Dujarric told reporters on Thursday that the two employees had been released earlier in the day and appeared to be in good health.
The Islamic Emirate of Afghanistan has not yet commented on the situation.
The UN warns that the longer the restrictions persist, the greater the threat to life-saving services across the country.