Mahmoud Doaei, managing editor of the Ettelaat daily, was indicted on Tuesday by a media court for using a picture of Khatami, a two-term (1997-2005) reformist president, in Saturday's edition of the paper.
Ettelaat also carried excerpts of an interview which Khatami gave to Lebanon's As-Safir newspaper.
The ruling on Khatami, issued by Tehran's prosecutor, amounts to a domestic media blackout and is linked to Iran's disputed presidential vote in 2009 in which Mahmoud Ahmadinejad was re-elected.
Khatami, whose tenure was marked by unsuccessful attempts to open up Iran to the West, was among prominent figures who said the ballot was fraudulent and refused to recognise Ahmadinejad's victory.
Despite the indictment Doaei used a front page editorial to write an open letter to Iranian President Hassan Rouhani suggesting that officials behind "subjective" directives, rather than editors, should be prosecuted.
"Ettelaat daily won't accept it," Doaei wrote, saying the media ban was not based on law or regulations and calling on Rouhani, a self-declared moderate, to tell Iran's judiciary to "stop this unconstitutional procedure".
Signup to our newsletter and follow us on Facebook and Twitter!
"We will continue our rational process of reporting on the gentle, popular and distinguished character of the revolution," he said of Khatami, calling him an "old friend" of Imam Ruhollah Khomeini, Iran's first supreme leader.
Publication of the editorial was swiftly followed by the judiciary saying Doaei, an official media representative of current supreme leader Ayatollah Ali Khamenei, had given a commitment not to breach the order.
"The managing director of Ettelaat has been summoned to the special clerics court. He was investigated and a signed pledge has been obtained from him," the judiciary spokesman said in a statement.
The apparent undertaking from Doaei was at odds with the rest of his editorial, which said restrictions on coverage of Khatami breached the ex-president's rights as well as damaging freedom of the press.
"Any authority or dependent agents who go against the constitution, removes personal freedom or deprives people of their rights under the constitution should be barred from service for one to five years, or face up to three years in jail," Doaei said.
After the 2009 election, Khatami echoed claims by reformist opposition leaders Mir Hossein Mousavi and Mehdi Karroubi that the vote was rigged.
Mousavi and Karroubi, who ran against Ahmadinejad, have been under house arrest since February 2011, and pictures of them are barred while reports describe them as "heads of the sedition", the name given by the regime to deadly protests that erupted after the vote.
Khatami repeatedly called for the release of Mousavi and Karroubi but following the media ban on his name and picture he is referred to only as "head of the reformist government".