The crowd called for the expulsion of remaining American forces from Iraq during the demonstration commemorating the 2020 air strike that killed Soleimani and his lieutenant Muhandis.
Thousands have marked the second anniversary of the killing of a revered Iranian commander and his Iraqi lieutenant in a targeted US drone strike.
The demonstrators, supporters of Iraq's Hashd al Shaabi alliance of armed groups, chanted "Death to America" as they filled a Baghdad square to honour Iran's General Qasem Soleimani on Saturday.
"US terrorism has to end" read one sign at the rally by backers of the pro-Iranian Hashd, a former paramilitary alliance that has been integrated into Iraq's state security apparatus.
“We will not let you stay after today on in the land of the martyrs,” some of the placards read.
Former US president Donald Trump ordered the strike that killed Soleimani near Baghdad's airport along with his Iraqi lieutenant Abu Mahdi al Muhandis, Hashd's deputy.
Trump said at the time that the assassination came in response to a wave of attacks on US interests in Iraq.
Soleimani headed the Quds Force, the foreign operations arm of the elite Revolutionary Guards, until his death on January 3, 2020.
Calls for withdrawal of US troops
The killing of Soleimani sent shock waves across the region and sparked fears of a direct military confrontation between Washington and Tehran.
Tehran, which wields considerable influence in neighbouring Iraq, warned it would avenge Soleimani's death.
Five days after his killing, Iran fired missiles at an air base in Iraq housing US troops and another near Erbil in the north.
Since then dozens of rockets and roadside bombs have targeted Western security, military and diplomatic sites across Iraq.
Iraqi and Western officials have blamed hardline pro-Iran factions for the attacks, which have never been claimed by any group.
Hashd has repeatedly called for the withdrawal of US troops who are deployed in Iraq as part of a multinational coalition fighting the Daesh group.
In December, Iraq announced the end of the "combat mission" there of the US-led coalition against the Daesh. But about 2,500 American soldiers and 1,000 coalition troops will remain deployed in Iraq to offer training, advice and assistance to national forces.