WASHINGTON—An 11th-hour Republican push to undo large parts of the Affordable Care Act suffered an apparently lethal blow Friday when Sen. John McCain (R., Ariz.) said he wouldn’t support the plan, prompting congressional aides of both parties to say they saw no path forward for the bill.

Mr. McCain’s opposition came the same day another Republican, Susan Collins of Maine, said she was leaning against the legislation. Sen. Rand Paul (R., Ky.) had already said he wouldn’t vote for it, and GOP leaders can only afford to lose two Republican votes.

The surprise statement by Mr. McCain marked the second time he had opposed Republican health legislation at a critical moment; he cast a “no” vote that helped sink a previous version, in July. Mr. McCain’s decision was especially resonant given his close friendship with Sen. Lindsey Graham (R., S.C.), the bill’s chief sponsor along with Sen. Bill Cassidy (R., La.).

“I cannot in good conscience vote for the Graham-Cassidy proposal,” Mr. McCain said. “I believe we could do better working together, Republicans and Democrats, and have not yet really tried.”

Mr. Graham said his bill would reverse what he called the ACA’s Washington-centered health approach and give more power to states. “I feel an obligation to fix this disaster,” he said of the ACA. “We press on.”