"A foreign force occupied an Arab country and hanged its president and we stood by and watched," he told an Arab summit in the Syrian capital.
Saddam was hanged in December 2006 after being sentenced to death for crimes against humanity over the mass killing of Shias in the 1980s.
"How can they execute a prisoner of war and the president of a member of the Arab League?" Gaddafi asked.
He said Saddam had been a friend of the United States during the Iran-Iraq war in the 1980s "before they turned against him and executed him."
"You could all suffer the same fate," he warned.
"Even you, even we, who are considered friends of America, one day (America) can give the green light for our own hanging," said the Libyan leader whose country resumed ties with the United States in 2004 after a 23-year break.
Diplomatic ties between Washington and Tripoli were restored after Gaddafi announced that Libya had renounced efforts to acquire weapons of mass destruction.
Full links were normalised last year with an exchange of ambassadors and Libya's removal from a US State Department list of states supporting terrorism.
Gaddafi also deplored what he called a lack of unity among the 22-member Arab League.
"We insult each other and we plot against one another," he said. "We share the same blood and the same language, although it is threatened with disappearance, but apart from that nothing unites us."
Half of the region's leaders boycotted the Arab summit, with many blaming Syria for the continuing political crisis in Lebanon.