Parliament in Baghdad also called for a ban on foreign forces using Iraqi land, airspace or water for any reason.
The US has some 5,000 military personnel in Iraq, mainly as advisers.
Thousands of Iraqis attended a funeral procession for Qasem Soleimani before his body was flown to Iran.
The non-binding resolution was passed on Sunday after Iraq's caretaker Prime Minister, Adel Abdul Mahdi, called for an end to the foreign military presence in a speech to MPs.
More about: Iran