"We are still at the beginning of the path and greater changes are ahead. This thunderous revolution will continue until justice is implemented.
"Although the Islamic revolution happened in Iran it is not limited to Iranian borders," he said.
Khomeini's shrine was decorated with a large poster of the late cleric as he disembarked from an Air France passenger jet to herald in a new era in Iran.
"The Islamic revolution is the result of sacrifices made by martyrs," read a banner inscribed with one of Khomeini's famous quotes.
Ahmadinejad, who is seeking re-election in four months, was joined by Ayatollah Ali Khamenei, the supreme leader who succeeded Khomeini, as well as members of the government and military commanders.
Hundreds of military personnel, police officers and civilians gathered at the mausoleum to pay their homage as poets recited Khomeini's verses and a military police band played traditional songs.
Many speakers condemned Israel's war on Gaza, which killed more than 1,300 Palestinians, and US policies during the ceremony.
"Because of Islam we saw victory in Gaza and Lebanon," Hassan Khomeini, the revolutionary leader's grandson, said.
"Iranians are proud because Khomeini was the flag bearer of this Islamic awakening worldwide."
Iran has organised 10 days of celebrations to mark the anniversary of the overthrow of the US-backed shah, who ruled Iran for four decades.