The Iranian leader also described the US as being disingenuous, saying: "It is clear the United States is not against nuclear bombs because they have a Zionist regime with nuclear bombs in the region."
But he added: "They are trying to save the Zionist regime, but the Zionist regime will not survive. It is doomed."
Russia 'halts missile sale'
Meanwhile Russia has signalled that it is moving to halt its sale of air defence missiles to Iran following fresh UN sanctions over Iran's atomic programme.
"S-300 supplies to Iran fall under UN sanctions," a Kremlin source said, referring to the defence system Russia has long planned to deliver to the Islamic republic.
"Thus this type of weapon cannot be delivered to Iran," the source added.
However a final decree on the issue would need to come directly from Dmitry Medvedev, the Russian president, the foreign minister has said.
The UN Security Council resolution passed Wednesday bans Iran from developing ballistic missiles capable of delivering nuclear weapons, investing in nuclear-related activities and buying certain types of heavy weapons.
Ahmadinejad's visit to China comes at a delicate time in Tehran's relations with its ally, after Beijing backed the sanctions.
As a permanent member of the UN Security Council, China could have exercised its veto power to block the sanctions.
Iran says its programme is purely for civilian energy purposes but critics suspect it of developing atomic weapons.
Marking Iran Day at his country's pavilion at the expo, Ahmadinejad did not directly criticise his host.
But he skipped Friday's summit in Uzbekistan of the Shanghai Co-operation Organisation, which was attended by presidents Hu Jintao of China and Dmitry Medvedev of Russia.
Iran is an observer in the group but Ahmadinejad chose the low-key visit to Shanghai over an appearance at the regional security summit in Tashkent.
He was not scheduled to meet Chinese leaders while in China, nor visit the capital, Beijing.
Bilateral trade between China and Iran reached at least $36.5bn last year.
Iran meets 11 per cent of China's energy needs and Chinese companies have major investments in Iranian energy extraction projects and the construction of roads, bridges and power plants.