WASHINGTON—President Trump said he wouldn’t work with Democrats while investigations of him continue and abruptly ended a meeting with the party’s leaders Wednesday, casting fresh doubt on a divided Washington’s ability to complete big-ticket legislation in the next 18 months.

The morning began with House Speaker Nancy Pelosi (D., Calif.) accusing the Republican president of engaging in a “coverup” as she fended off a rising chorus of Democrats calling for Mr. Trump’s impeachment. Soon after, Mr. Trump stormed out of a planned...