WASHINGTON — Senator John McCain of Arizona announced on Friday that he would oppose the latest proposal to repeal the Affordable Care Act, leaving Republican leaders with little hope of succeeding in their last-ditch attempt to dismantle the health law and fulfill their longstanding promise to conservative voters.

For Mr. McCain, it was a slightly less dramatic reprise of his middle-of-the-night thumbs-down that killed the last repeal effort in July. This time, the senator, battling brain cancer and confronting his best friend in the Senate, Lindsey Graham of South Carolina, issued a statement saying that he could not “in good conscience” support the proposal by Senators Graham and Bill Cassidy of Louisiana.

“I believe we could do better working together, Republicans and Democrats, and have not yet really tried,” Mr. McCain said. “Nor could I support it without knowing how much it will cost, how it will affect insurance premiums, and how many people will be helped or hurt by it.”

With two other Republican senators likely to vote no, Mr. McCain’s opposition to the bill could be fatal. With Democrats united in opposition, Senate Republicans can afford to lose only two of their members.