WASHINGTON—Senate GOP leaders gave up their effort to dismantle and simultaneously replace much of the Affordable Care Act, after the defections of two more Republican senators left the party short of the votes needed to pass President Donald Trump’s top legislative priority of his first seven months in office.

In a stinging defection for party leadership, GOP Sens. Mike Lee of Utah and Jerry Moran of Kansas on Monday night became the third and fourth Republicans to oppose the latest version of the GOP bill, which would roll back and replace much of the Affordable Care Act.

Senate Republicans had already lost two GOP votes, from Sens. Rand Paul of Kentucky and Susan Collins of Maine, and the new opposition from Messrs. Lee and Moran meant Senate leaders didn’t have enough support to advance the bill in a procedural vote.

Senate Majority Leader Mitch McConnell (R., Ky.) acknowledged the defeat. “Regretfully, it is now apparent that the effort to repeal and immediately replace the failure of Obamacare will not be successful,” he said in a statement.

In a strategy facing long odds, the majority leader said the Senate would instead vote in coming days on a bill the chamber passed in late 2015 to unravel most of the ACA, a measure former President Barack Obama vetoed in January 2016.