"It is a common threat for all of us," he said. "And this requires a unison effort from all of us."
"We need a vast campaign of operations ... the aerial bombardment campaign is mostly, I would say, a form of theater, rather than a serious battle against terrorism."
Iran and the United States have found their foreign policies surprisingly aligned in the past several months, as both try to beat back the advance of the Sunni extremists that have gained a foothold in Iraq and war-torn Syria.
While the United States has limited itself thus far to airstrikes in those two countries, Iran has sent Revolutionary Guard units into Iraq; the head of the Revolutionary Guard's Quds Force, Qassem Suleimani, has even been photographed on the ground in Iraq.
Five Gulf countries, traditional adversaries of Shiite Iran, joined with the United States in a rare coalition to strike ISIS in Syria.
However, Rouhani said he'd like to distance himself "from the word 'coalition' because some countries haven't come together under the umbrella of this coalition."
The question of Syria
Many of the countries participating in the coalition have long pushed for the ouster of Syrian strongman Bashar al-Assad, as the Emir of Qatar told Amanpour on Thursday in his first-ever interview. Iran, on the other hand, is al-Assad's most fervent backer; most military analysts agree that the regime would have fallen long ago were it not for Iran's 2012 intervention in the conflict.
"How do you feel," Amanpour asked Rouhani, "as the president of Iran, as the main military backer of a regime, the Assad regime, that the United Nations has said has killed 200,000 of its own people -- tortured people, executed people. Why does Iran want to be associated with that kind of genocidal barbarism?"
"The army of that country was carrying out a battle against the terrorists," Rouhani replied. "They kept saying that these are opposition members and we will keep asking who are these opposition members who have preferred to take up arms so swiftly and so savagely and violent, reasons rather than resorting to talks and negotiations?"
Amanpour countered that "it all started when (the Syrian people) wanted a little bit of reform and the government of that nation responded in a way that the United Nations now says has caused the death of 200,000 civilians."
"If the army of the Syrian people, the Syrian government, had not stood up and fought against terrorism," Rouhani said, "who do you think would have been the victor today? Let's assume no one would have rendered assistance. The victor would have been the same people that everyone is recognizing as terrorists today."
'Justice will be employed'
Amanpour also asked the Iranian leader about the detainment this summer of a high-profile journalist for the Washington Post, Jason Rezaian, and his wife, Yeganeh Salehi.
Would Rouhani, as a gesture of goodwill, release them from custody, along with several others who have been detained, including an English-Iranian woman, Ghoncheh Ghavami, and the American Amir Hekmati, Amanpour asked.
"We never wish for any individuals, Iranian or non-Iranians, be it in Iran or in other countries, to be imprisoned or detained or be put on trial," he said.
"If they do go to trial, the trial will be fairly executed for them to have access to every legal defense allowed under the law, proper defensive representation through qualified attorneys, and we do hope that their families can gain the certainty that fairness and justice will be employed towards the cases and case files of their loved ones."
The President also noted that Iran does not recognize dual citizenship, so anyone with an Iranian passport is considered Iranian only by the government.
"I do not believe that an individual would be detained or put in prison for being a journalist. An individual can be a reporter, a journalist, and have committed a crime. But that crime is not necessarily always related to their profession, to the profession that they're practicing."
"My personal opinion is, and I've announced it several times when I've spoken on different occasions, we believe that the general behavior towards reporters and journalists and those who carry the heavy weight of informing our citizenry, must be quite flexible."
"The truth of the matter is that I cannot have the time nor the inclination nor access to every single case file. But what I must... be assured of as the chief executive of my branch is that the constitution and the laws and the civil rights are being respected to the letter."
Iran continues to be part of intense negotiations with the United States, Britain, France, Russia, China and Germany over its nuclear program.
In an effort to reach a permanent deal that would trade nuclear guarantees for the reduction of sanctions, world powers agreed earlier this year to extend the interim agreement that provided the framework for negotiations.
That interim deal, Rouhani said, is "concrete proof that talks and negotiations succeed."
"We must all accept that there is only one way and that's the way of dialogue and talks and negotiations," he told Amanpour. "This means that sanctions are an inappropriate tool. That means that threats are the wrong path."
Both Iran and its negotiating partners are discussing the issues with the "utmost seriousness," he said.
"There are still differences of opinion. Some of these differences of opinion can be quite significant. But at the end of the day, we must all strive to find a solution and resolve this."
Right now there's a November deadline to reach a permanent solution, after which the temporary sanctions relief and enrichment freezes would be lifted.
Rouhani said that for now, Iran is only thinking about reaching that deal, not about another extension.
Even if a deal is agreed upon, various legislative bodies -- most importantly the U.S. Congress -- would still have to approve the lifting of sanctions.
Amanpour asked whether it had been fully made clear to him how difficult that process could be.
"That's their own business, quite frankly," the President said. "I do think that if the agreement is reached, it can immediately cease and melt away -- take away these sanctions."
'Our people realize... we have taken steps forward'
Rouhani, through his office, is a prolific user of Twitter. But the platform remains off-limits to most Iranians, who must use technical workarounds to access the service.
In an interview with Amanpour last year, Rouhani said that all of his efforts were "geared to ensure that the people of Iran will comfortably be able to access all information globally and to use it."
As the Iranian President spoke at the U.N. General Assembly in New York, the CEO of Twitter, Dick Costello, sent out a tweet.
"Mr. President, enjoying your Tweets from the UN," Costello wrote. "We would love the Iranian people to enjoy them as well. When will that be?"
Amanpour asked Rouhani for his reaction.
"It is correct we have not yet reached a point in which we feel completely comfortable in what our people intended during the elections and voted for."
"But our people realize that we have taken steps forward. And our people are fully aware that in such matters, we must have a coordination with other branches of the government -- with the judiciary, with the parliament, with the legislatures" -- a seeming reference to the fact that others in the Iranian government may not be as keen to open up the Internet as he is.
"What is important to keep in mind is that we've had sustainable movement forward throughout the past 12-plus months."