The walkout began when a US diplomat who was in the assembly hall to monitor the speech left halfway through, while the 27 European Union nations then followed in a coordinated protest move.
The Iranian leader again cast doubt on the origins of the Holocaust and the September 11, 2001 attacks and criticized the United States for killing Osama bin Laden rather than bringing him to trial.
Ahmadinejad has in the past drawn international condemnation for his use of speeches to promote conspiracy theories and call for Israel's destruction.
Ahmadinejad told the UN summit that Western allies had used the media to "threaten anyone who questions the Holocaust and the September 11 event with sanctions and military action."
The Iranian leader said he had been threatened by the US government after he last year alleged American government involvement in the attacks and called for an independent investigation.
Moving to the US operation to kill bin Laden, Ahmadinejad said: "Would it not have been reasonable to bring to justice and openly bring to trial the main perpetrator of the incident in order to identify the elements behind the safe space provided for the invading aircraft to attack the twin World Trade Center towers?"
In a general blast at the West, Ahmadinejad said: "Hypocrisy and deceit are allowed in order to secure their interests and imperialistic goal." "Drug trafficking and killing of innocent human beings are also allowed in pursuit of such diabolical goals," he added.