The attacks yesterday at Tehran's parliament complex and the shrine of revolutionary leader Ayatollah Ruhollah Khomeini wounded more than 50 people and were the first claimed by IS in Iran.
"The five known terrorists... After joining the Daesh (IS) terrorist group, left the country and participated in crimes carried out by this terrorist group in Mosul and Raqa," the ministry said in a statement.
It suggested there were only five attackers rather than the six originally reported.
Abu Aisha was killed and the network forced to flee the country, the statement said. It was not clear when the five men returned to Iran ahead of Wednesday's attacks.
More From This Section
Iran denounced Donald Trump's reaction to the attacks as "repugnant" after the US president said the nation was reaping what it sowed.
Trump said the US would "grieve and pray" for the victims, but added: "We underscore that states that sponsor terrorism risk falling victim to the evil they promote."
The attackers were armed with rifles and pistols and at least two blew themselves up with suicide vests, Iranian media reported.
Police said a further five people were arrested around Khomeini's shrine on suspicion of involvement.
In the midst of the unfolding attacks, the intelligence ministry said a third team had been stopped before the attacks started, but no further details have since been given.
"The network of this terrorist group has been identified and some of its members have been arrested," Intelligence Minister Mahmoud Alavi said.
Iran's elite Revolutionary Guards have pointed the finger at regional rival Saudi Arabia -- a close US ally -- which Iran accuses of funding extremism and groups including IS.
IS has threatened to step up recruitment within Iran, releasing its first Persian-language video in March in which it threatened to "conquer Iran and restore it to the Sunni Muslim nation as it was before."
The Sunni jihadists of IS consider Shiite Iran to be apostates, and Tehran is deeply involved in fighting the group in both Syria and Iraq.
"Iranians lit candles for you on 9/11. You kick them while they're down. Classy," tweeted Ali Ghezelbash, an Iranian business analyst.
The US president has long accused Iran of backing terrorism and has threatened to tear up a 2015 nuclear deal between Tehran and major powers.
Trump's statement is "counter-productive and further narrows the opportunity for engagement between the US and Iran on countering a common enemy," said Ellie Geranmayeh, senior fellow with the European Council on Foreign Relations.
Sunni Gulf Arab states are in the midst of a major diplomatic crisis after Saudi Arabia and its allies cut ties with Qatar on Monday over claims it supports extremism and has fewer tensions with Iran.
Iranian leaders sought to play down the attacks, with supreme leader Ayatollah Ali Khamenei saying: "These firecrackers that happened today will not have the slightest effect on the will of the people.