WASHINGTON—President Donald Trump questioned why the U.S. would admit people from “shithole countries” Thursday, roiling discussions over a bipartisan Senate deal to protect young undocumented immigrants.

Mr. Trump made the comments at a private White House immigration meeting that included a bipartisan group of lawmakers, asking why the U.S. would want to admit people from Africa, the source of many diversity lottery applicants, according to two people briefed on the meeting.

...