A German aid worker and an Afghan guard were killed and the Finnish woman was abducted as gunmen stormed the guest house in Kabul in May.
"Kidnapped Finnish national in Afghanistan has been released and is safe," the ministry said on Twitter.
Foreign Minister Timo Soini later said that "Finland did not pay a ransom and never will".
"If we do, it will only incite new kidnappings," he told a news conference.
National Bureau of Investigation chief inspector Thomas Elfgren said she was "in good health".
More From This Section
Operation Mercy works with local Afghan communities in areas such as reducing infant mortality and women's empowerment.
"It is with great joy that we confirm the release of our Finnish colleague who was abducted on 20 May," Operation Mercy said in a statement.
The kidnapping of foreigners has been on the rise, but the threat of abductions is even greater for Afghans.
The Finnish woman's identity was not disclosed and authorities have called for respecting her and her family's privacy.