The Associated Press reported that UN spokesperson Stéphane Dujarric told reporters at the UN headquarters in New York on Thursday that the two staff members had been released and were in good health.
Dujarric said the two apparently faced no further legal or judicial proceedings.
The United Nations Assistance Mission in Afghanistan (UNAMA) said the two staff members, who were detained in Herat city on August 9, were released on Thursday morning and were in good health.
UNAMA said it had not yet been officially informed of the reasons for their detention but was continuing to follow up on the matter with Afghan authorities.
In a statement, the UN said it was also following up to ensure respect for the privileges and immunities of the organisation, as well as the safety, security and freedom of movement of its staff and associated personnel across Afghanistan.
Afghan authorities have not yet commented on the release of the two UN staff members.
