The letter, reported by the Wall Street Journal, urges Ayatollah Ali Khamenei towards a nuclear agreement.
The US chief stresses any co-operation on fighting IS is contingent on Iran reaching such an agreement by a 24 November diplomatic deadline.
The White House has declined to comment on Mr Obama’s “private correspondence”.
The letter, sent last month, is at least the fourth time Mr Obama has written to the Iranian leader since taking office in 2009 and underscores his view that Iran is important in an emerging campaign against IS.
Officials with the Obama administration have, in recent days, placed the chances for a deal on Iran’s nuclear program at only 50-50, according to the Wall Street Journal.
US Secretary of State John Kerry is scheduled to begin negotiations on the issue with Iranian counterpart Javad Zarif this weekend in Oman.
World powers suspect Iran of trying to make a nuclear bomb, a claim it denies.
An interim deal agreed late last year gave Iran some relief from sanctions in return for curbs on nuclear activity.
But talks later stalled on the extent of uranium enrichment Iran would be allowed and on the timetable for sanctions to be lifted.
On Thursday, White House spokesman Josh Earnest declined to comment directly on the secret letter.
“I can tell you that the policy that the president and his administration have articulated about Iran remains unchanged,” he said in response to questions.
Also on Thursday, Republican Speaker of the House John Boehner said he did not trust Iran’s leaders and said they should not be brought into the fight against IS.
IS militants currently control large areas of Iraq and Syria, and have engaged in mass killings across the region.
Error: No connected account.
Please go to the Instagram Feed settings page to connect an account.