Iran is to have presidential elections in April. President Mahmoud Ahmadinejad is ineligible to run because of term limits.
Khamenei, in statements posted on his website, expressed frustration over a public row between Ahmadinejad and political rival Parliamentary Speaker Ali Larijani.
"The head of one of the branches in the government accused the head of the other based on unproven evidence that hasn't been brought up in court," Khamenei said. "This was bad and unsuitable."
Ahmadinejad's supporters threw shoes -- a severe insult in that part of the world -- at Larijani in the holy city of Qom after both sides traded accusations of corruption.
"We expect the officials to focus all their efforts on solving the problems of the people by exercising patience and by suppressing unrestrained emotions and by taking the issues of the country into consideration," Khamenei said.
Ahmadinejad has faced criticism in the past for his economic policies. The country's currency collapsed last year in part because of Western economic pressure.
Video of Victoria’s Secret models trying to 'twerk' hits Instagram
Megyn Kelly: Santa Claus and Jesus are both white men