WASHINGTON—The Republican effort to dismantle the Affordable Care Act collapsed early Friday when a slimmed-down Senate measure to pare back selected pieces of the 2010 health-care law failed, undermining the GOP leaders’ efforts to deliver on a longtime campaign promise.

Sen. John McCain (R., Ariz.) cast one of three GOP no votes that sank Senate Republicans’ latest effort to roll back a handful of elements of the law. GOP Sens. Susan Collins of Maine and Lisa Murkowski of Alaska also joined with Democrats to block the measure...