The letter writing is part of a recent thaw in relations between the two countries since the 1979 Islamic Revolution that toppled the US-backed shah and the storming of the US Embassy in Tehran, where 52 Americans were held hostage for more than a year.
It also comes as a US led coalition battles the Islamic State group in neighboring Iraq and as Iran and world powers negotiate a permanent deal regarding the country's contested nuclear program.
Obama's recent letter to Khamenei described a shared interest between the US and Iran in fighting Islamic State militants and stressed that any cooperation on that would be largely contingent on Iran agreeing to the nuclear deal, according to the Wall Street Journal. Shamkhani said the letter "mainly focused on nuclear issues."
We responded "that we can't accept at all to have a decorative, caricaturistic nuclear industry," Shamkhani said. There was no immediate response in Washington to Shamkhani's comments.
More From This Section
A deal is supposed to put in place measures that would prevent Iran from making an atomic weapon in exchange for the lifting of economic sanctions. Iran has said its program is for peaceful purposes.
The talks reportedly remain stuck over the size and output of Iran's uranium enrichment program, a technology that can be used to produce nuclear fuel or nuclear weapons and how the sanctions must be lifted.
Obama and Iranian President Rouhani also held a historic phone call last fall, the first direct communication between their nation's leaders since the Islamic Revolution.