'Appalled and outraged'
The declared winner of his country's presidential election said that Obama, being a new president, would still gather "experiences" and he urged him to "correct himself".
Ahmadinejad's speech came days after Obama criticised the conduct of the June 12 election, warning that Tehran wanted to blame the US for opposition protests.
The US president said on Tuesday that he was "appalled and outraged" over threats, beatings and imprisonments of opposition protesters following the polls.
Ahmadinejad's response on Thursday included a warning that there would be "nothing left to talk about" if Obama continued to use "such language".
Robert Gibbs, the White House spokesman, said later in the day: "There are people in Iran who want to make this not about a debate among Iranians in Iran, but about the West and the United States.
"I would add President Ahmadinejad to that list of people trying to make this about the United States."
Before the Iranian election, the Obama administration had indicated it was interested in "reaching out" to Iran after decades of frozen diplomatic relations.
The latest comments by both presidents could complicate any attempt at a dialogue, which Washington hopes will include talks on the scope of Iran's nuclear programme.
In his speech on Thursday, Ahmadinejad also criticised Britain, which Iran has repeatedly accused of deliberately fomenting unrest, saying it and other European countries were led by "a bunch of politically retarded people".
Separately on Thursday, the White House named Dennis Ross to a key job overseeing US policy in a vast region encompassing the Middle East, the Gulf, Afghanistan, Pakistan and South Asia.
Ross, a former special adviser on Iran to Hillary Clinton, the secretary of state, had been moved from his previous post amid reports that Tehran was unwilling to engage with him because of his strong ties to Israel.
Ross had also written a book rejecting the Obama administration's focus on the Israeli-Palestinian conflict as key to achieving peace in the Middle East.
The White House said Ross would work with senior officials on some of the most testing US foreign policy challenges, including Iran, but denied his new role would conflict with existing US special envoys.