The report, in the Wall Street Journal, said that Obama wrote to Khamenei in mid-October, suggesting that any cooperation against the militant group would depend on whether Iran and six world powers reach a nuclear deal. If true, the news could alarm America's Arab allies and Israel, regional rivals of Tehran who worry that a U.S.-Iranian alliance would threaten their security.
Josh Earnest, the White House press secretary, while not denying the report, said he could not comment on "any correspondence between President Obama and any world leader."
He noted that U.S. officials are in talks with Iran about the nuclear deal, and that officials of the two countries have spoken on multiple occasions about the international effort to stop Islamic State militants in Syria and Iraq.
Iranian officials declined to comment.
The Obama administration has been cautious in discussing contacts with Iran, because of the sensitivity of Sunni Arab states, the Israelis and the Shiite Muslim-dominated government of Iraq. Almost every country in the region opposes the idea of a U.S.-Iranian entente.
Obama has written to Khamenei multiple times since 2009. The president now has a strong motive to write to the Iranian leader, with the Nov. 24 deadline for international talks for a nuclear agreement less than three weeks away.
A nuclear deal is Obama's highest national security priority, according to presidential aides, who have said it could be as important to his legacy as the Obama healthcare act.
In comments at a news conference Wednesday, Obama acknowledged that the deal could founder on the opposition of conservative Iranians.
Khamenei, who will cast the deciding vote on any deal, has authorized Iran's president,