Kourosh Ahmadi was convicted of providing intelligence to the CIA, Tehran's prosecutor's office said.
It is not clear when Heydari and Ahmadi were arrested or where they were tried.
"Karzai and Bush will have responsibility for whatever happens to the hostages, " Ahmadi said.
Ahmadi also said the exact size of Yemen-based Al Qaeda in the Arabian Peninsula (AQAP) was unknown.
The attackers were arrested and are being interrogated, said Abdul Raouf Ahmadi, spokesman for police forces in western region.
Qari Yousef Ahmadi, who claims to speak for the Taliban, had demanded that eight militant prisoners be released by midday Wednesday.
Taliban spokesman Qari Mohammad Yousif Ahmadi said the deaths happened after a firefight between Taliban forces and "enemy forces" from Monday to Wednesday.
The Taliban "want to negotiate directly with the Koreans because the Kabul administration is not sincere about releasing the Taliban prisoners, " Ahmadi said.
Press TV said Heidari provided classified information to Mossad, the Israeli intelligence agency, and Ahmadi had been convicted of providing the CIA with intelligence.
Qari Yousef Ahmadi, who claims to speak for the Taliban, said the lives of the hostages rest in the hands of Karzai and President Bush.
State-controlled television gave reasonably even-handed campaign coverage and screened slick, Hollywoodised propaganda slots produced by some of the candidates (though not the strait-laced Mr Ahmadi-Nejad).
"Saudis bring ideology, funding and bomb-making expertise to AQAP, " Ahmadi said.
"Bush and Karzai have to accept the Taliban conditions otherwise they will see a very bad result for Korean hostages, " said the spokesman, Qari Yousef Ahmadi.
It is surrounded by corrugated iron fences, its sprawling complex - often used by non-Ahmadi neighbours on Sundays for badminton or football - closed off to everyone.
As recently as Sunday, Yemeni officials including provincial governor Al Hasan al-Ahmadi claimed that al-Awlaki was hiding out in the southern mountains of Yemen with al Qaeda.
"If the Kabul government does not release the Taliban prisoners, then we will kill after 12 o'clock - we are going to kill the Korean hostages, " Ahmadi said.
The men were identified as Mohammad Heidari and Kourosh Ahmadi.
Taliban spokesman Qari Yousuf Ahmadi told the BBC that this was not the first time Americans had carried out such a "wild action" and that Taliban attacks on the Americans would continue.
However, he will face not Mr Moin, who limped home in fifth place, but Mahmoud Ahmadi-Nejad, a hardline religious conservative and mayor of the capital, Tehran, who came from nowhere to achieve second place.
"One of our jihadists... blew up his motorcycle near the vehicle of Abdul Latif Ashna, the deputy governor of Kandahar, killing the deputy governor, " Taliban spokesman Yousuf Ahmadi was quoted as saying by the AFP news agency.
应用推荐