A four-page Democratic resolution said the U.S. House of Representatives “strongly condemns President Donald Trump’s racist comments that have legitimized and increased fear and hatred of new Americans and people of color”.
It said Mr Trump’s slights “do not belong in congress or in the United States of America”.
The resolution included a full page of remarks by President Ronald Reagan, who is revered by Republicans.
Mr Reagan said in 1989 that if the US shut its doors to newcomers, “our leadership in the world would soon be lost”.
In tweets on Tuesday night, Mr Trump took a positive view of the vote, saying it was “so great” that only four Republicans had crossed party lines and noting the procedural rebuke of Ms Pelosi.
“Quite a day!” he wrote.
Mr Trump’s criticism was aimed at four Democrats who have garnered attention since their arrival in January for their outspoken liberal views and thinly veiled distaste for Mr Trump: Ms Ocasio-Cortez, Ilhan Omar of Minnesota, Ayanna Pressley of Massachusetts and Rashida Tlaib of Michigan.
All were born in the US except for Ms Omar, who came to the US as a child after fleeing Somalia with her family.
The four have been in an increasingly personal clash with Democratic Speaker Ms Pelosi, too, over how assertively the House should be in trying to restrain Mr Trump’s ability to curb immigration.