WASHINGTON — President Trump ordered senators back to the negotiating table on Wednesday for a last-ditch effort to repeal and replace the Affordable Care Act, just one day after angrily accepting the measure’s demise and vowing to allow President Barack Obama’s signature domestic achievement to crater.

Mr. Trump, staring down a high-profile defeat on an issue that has confounded him and defied Republican consensus, told the party’s senators they must not leave Washington without acting on a measure to roll back Mr. Obama’s health law and replace it with something better. Simply repealing the bill without an alternative would increase the number of people without health insurance by 17 million in 2018, a figure that would jump to 32 million in 2026, according to the nonpartisan Congressional Budget Office.

At a White House lunch, Mr. Trump warned the senators that any who stood in the way would be telling voters that they backed the current, “failed” program.

“I intend to keep my promise, and I know you will, too,” Mr. Trump told them, trying to resurrect a measure that appeared dead on Monday night, after a third and fourth Republican senator declared their opposition. That death was followed on Tuesday by an 11th-hour effort to force a vote on repealing the Affordable Care Act without a replacement, but that, too, failed when three Republican senators came out against it.