The initial group of 23 South Koreans, who had travelled to Afghanistan to undertake aid work, were seized by the Taliban on July 19 in Ghazni.
The group killed two of the Koreans shortly after the kidnapping, but later it released two women in what it said was a goodwill gesture.
The Taliban began freeing the remaining hostages after an agreement was reached during talks with a visiting delegation from South Korea.
Under the terms of the deal, South Korea agreed to end missionary activities by Christian groups in Afghanistan.
Seoul's small contingent of non-combat troops in the country will also be withdrawn within the year.
The Taliban had initially demanded the release of members held prisoner by the Afghan government but Kabul had refused saying such a move would encourage more kidnappings.
Alan Fisher, reporting for Al Jazeera's from Kabul, said the Koreans released on Thursday would now be given brief medical checks and reunited with their colleagues in the Afghan capital.
The South Korean government has won praise from some quarters for its part in securing the release of the 19 remaining hostages, but critics said Seoul might have set a dangerous precedent in directly negotiating with the Taliban.
There has also been speculation that the South Koreans bought the release of the hostages, though both the Taliban and the South Korean government denied there was any secret deal.
Alan Fisher said there had been rumours in the capital that up to $20 million had been paid to secure the release.
"I spoke to one senior Afghan authority who, while not confirming the figure, did say that money was paid - that the South Koreans had paid cash to the Taliban."
|The Taliban had already released two Korean |
hostages as a "goodwill gesture" [EPA]
But Qari Mohammad Bashir, a Taliban commander, denied that a ransom had been paid.
"I strongly deny this. It's not true that money was involved," he said.
Al Jazeera's Tony Birtley, reporting from South Korea, said: "Most people here [in Seoul] think that South Korea has probably paid a ransom, but that will be debated later when the hostages have returned home safely."
Meanwhile, the father of one of the men who was killed condemned the church that organised the trip.
"I wonder why the church was so reckless in taking them to the dangerous country," Shim Chin-Pyo, whose 29-year-old son was killed, said.
"They were in the wrong place at the wrong time, moving in such a conspicuous manner."
Prior to the kidnapping, South Korea warned its citizens not to travel to Afghanistan and blocked many of its growing legion of evangelical Christians from going there due to safety concerns.
Source: Al Jazeera and agencies