Washington (CNN) Shortly before Sen. John McCain entered the Senate chamber in the wee hours of Friday morning, reporters wanted to know how he'd vote.

He instructed them to "watch the show."

McCain killed his party's narrowly-crafted Obamacare repeal bill Friday not because he was opposed to dismantling the Affordable Care Act, but because he fundamentally believed the process -- the lack of hearings, the one-party, closed-door negotiations, the fact that in the end all that Republican senators could agree upon was a shell of the plan they'd promised -- was flawed.

It was a result that may have been hinted at earlier in the week.

Less than two weeks after surgery to remove a blood clot revealed McCain had brain cancer, the Arizona Republican -- still with a visible scar above his eye -- traveled 2,000 miles from Phoenix and returned to a hero's welcome Tuesday in the Senate, where he delivered an epic 15-minute speech that rattled the conscience of the body.

"We're getting nothing done, my friends," McCain told his colleagues. "We're getting nothing done."

It was a fiery and intense lecture on the shortcomings of bypassing "regular order" and turning your back on compromise. But moments earlier, McCain had delivered a decisive vote to advance a health care bill that was still an uncertain product at that point, a kind of blessing for the type of secretive negotiations he'd just decried.

Photos: The life and career of US Sen. John McCain US Sen. John McCain speaks at a town-hall meeting while campaigning for the presidency in 2008. He was the Republican Party's nominee for that year's election, which he lost to Barack Obama. Hide Caption 1 of 29 Photos: The life and career of US Sen. John McCain McCain sits on a sofa with his sister, Sandy, in a reproduction of a family photo taken around 1938. McCain was born in 1936 to Roberta McCain and John McCain Jr., a Navy admiral. Hide Caption 2 of 29 Photos: The life and career of US Sen. John McCain McCain sits with his grandfather and his father, both of whom were Navy admirals, in this family photo from the 1940s. Hide Caption 3 of 29 Photos: The life and career of US Sen. John McCain McCain, bottom right, poses with his Navy squadron in 1965. Hide Caption 4 of 29 Photos: The life and career of US Sen. John McCain McCain graduated from the US Naval Academy in 1958 and served in the Navy until 1981. Hide Caption 5 of 29 Photos: The life and career of US Sen. John McCain During the Vietnam War, McCain's plane was shot down and captured by North Vietnamese forces. Here, he is pulled out of a lake in Hanoi by North Vietnamese soldiers and civilians in October 1967. McCain broke both arms and his right knee upon ejection and lost consciousness until he hit the water. Upon capture, McCain was beaten, he has said. He was held for five years by the North Vietnamese and tortured. Hide Caption 6 of 29 Photos: The life and career of US Sen. John McCain A Vietnamese doctor examines McCain in 1967. For his service, McCain was awarded the Silver Star, the Bronze star, the Legion of Merit, a Purple Heart and the Distinguished Flying Cross. Hide Caption 7 of 29 Photos: The life and career of US Sen. John McCain McCain, center, and his wife, Cindy, pose with US Rep. John Rhodes after McCain was elected to the House in 1982. McCain has represented Arizona ever since. In 1986, he became a US senator. Hide Caption 8 of 29 Photos: The life and career of US Sen. John McCain McCain talks with people in Hanoi, Vietnam, during the filming of the CBS special, "Honor, Duty and a War Called Vietnam" in 1985. Hide Caption 9 of 29 Photos: The life and career of US Sen. John McCain McCain, left, joins President George H.W. Bush at a news conference about soldiers missing in action during the Vietnam War. Hide Caption 10 of 29 Photos: The life and career of US Sen. John McCain McCain gets a kiss from his wife as they kick off his campaign for the 2000 presidential election. Hide Caption 11 of 29 Photos: The life and career of US Sen. John McCain McCain spends time with his wife and children at their home in Phoenix in 1999. John and Cindy McCain have two daughters, Meghan and Bridget, and two sons, Jack and Jimmy. He also has three children from a previous marriage: Andrew, Douglas and Sidney. Hide Caption 12 of 29 Photos: The life and career of US Sen. John McCain McCain rests in a New Hampshire motel room while on the campaign trail in 1999. Hide Caption 13 of 29 Photos: The life and career of US Sen. John McCain McCain poses with his wife and seven children in 2000. The children, from left, are Andrew, Jimmy, Jack, Bridget, Meghan, Douglas and Sidney. Hide Caption 14 of 29 Photos: The life and career of US Sen. John McCain McCain laughs during an interview with "Tonight Show" host Jay Leno in 2000. Hide Caption 15 of 29 Photos: The life and career of US Sen. John McCain McCain reaches out to supporters during a campaign rally in Portland, Maine, in 2000. He suspended his campaign several days later and eventually endorsed his primary opponent, George W. Bush. Hide Caption 16 of 29 Photos: The life and career of US Sen. John McCain John McCain addresses a shadow convention at the University of Pennsylvania in 2000. McCain was booed when he asked supporters to back George W. Bush for President. Hide Caption 17 of 29 Photos: The life and career of US Sen. John McCain McCain and his wife host George W. Bush and his wife, Laura, at the Arizona's Red Rock Crossing in 2000. Hide Caption 18 of 29 Photos: The life and career of US Sen. John McCain McCain acts in a skit while hosting "Saturday Night Live" in 2002. Hide Caption 19 of 29 Photos: The life and career of US Sen. John McCain McCain talks with US Marines in Iraq as he and other senators stopped at Camp Falluja in 2005. Hide Caption 20 of 29 Photos: The life and career of US Sen. John McCain McCain and fellow US Sen. Hillary Clinton listen to President George W. Bush speak at the National Prayer Breakfast in 2007. Hide Caption 21 of 29 Photos: The life and career of US Sen. John McCain McCain, again running for President, speaks during a campaign rally in New York in 2008. Hide Caption 22 of 29 Photos: The life and career of US Sen. John McCain McCain shakes hands with US Sen. Barack Obama, the Democratic presidential nominee, before their first debate in 2008. Obama defeated McCain in the general election. Hide Caption 23 of 29 Photos: The life and career of US Sen. John McCain McCain and US Sen. Mitch McConnell speak about health care reform in 2009. Hide Caption 24 of 29 Photos: The life and career of US Sen. John McCain McCain listens as former FBI Director James Comey testifies to the Senate Intelligence Committee in June 2017. Hide Caption 25 of 29 Photos: The life and career of US Sen. John McCain McCain returned to the Senate floor in July 2017, less than two weeks after surgeons removed a large blood clot from his brain and diagnosed him with brain cancer. He received a standing ovation on both sides of the aisle. Hide Caption 26 of 29 Photos: The life and career of US Sen. John McCain McCain votes no on the GOP's "skinny repeal" health care bill in July 2017. He was one of three Senate Republicans who voted against the failed bill. Hide Caption 27 of 29 Photos: The life and career of US Sen. John McCain McCain speaks to members of the media while heading to a roll-call vote in October 2017. Hide Caption 28 of 29 Photos: The life and career of US Sen. John McCain "No place I would rather be," Meghan McCain tweeted with this photo of her and her father in March 2018. Hide Caption 29 of 29

McCain's office announced Friday that he is planning to return to Arizona to start cancer treatment Monday. His office said he plans to return to Washington at conclusion of the August recess.

Friday morning, just before 2 a.m. ET, he delivered the fateful vote in the other direction. For over an hour, leadership tried to change his mind on the Senate floor on the "skinny repeal" bill. His junior colleague Arizona Sen. Jeff Flake appeared to be dispatched to talk him out of it. And when that didn't work, Vice President Mike Pence swooped in. Even President Donald Trump called to try a final "Hail Mary" to sway McCain, a source briefed on the call told CNN.

At one point, McCain was sitting with his long-time ally, Sen. Lindsey Graham of South Carolina. The two were deep in conversation as Graham nodded along. At one point Graham took a call, and the man who just days before had received an outpouring of support from his colleagues on the floor was all alone, with no Republican approaching the veteran senator.

JUST WATCHED McCain returns to Senate floor (full speech) Replay More Videos ... MUST WATCH McCain returns to Senate floor (full speech) 15:25

McCain has defied his party before. The former prisoner of war stood with Democrats to release a report on the use of enhanced interrogation techniques during the Bush years. He reached across the aisle to fix the country's health care system for veterans with independent Sen. Bernie Sanders, and was known to unload on his own party when he felt they needed a reality check.

But Friday's vote may be one of his most memorable moments. In the end, the senator voted against a bill that would have repealed the Affordable Care Act's individual and employer mandates, despised by Republicans, and against his party's seven-year campaign promise to dismantle President Barack Obama's signature legislative achievement. Instead, McCain took a vote that very well may re-chart the course of Trump's own legislative agenda.

Trump, of course, had insulted McCain back in 2015. "He is a war hero because he was captured," Trump said in a question-and-answer session in Iowa. "I like people that weren't captured, OK? I hate to tell you. He is a war hero because he was captured. OK, you can have -- I believe perhaps he is a war hero."

Earlier this week, after McCain's vote advancing the health care bill, Trump was far kinder.

"So great that John McCain is coming back to vote. Brave - American hero! Thank you John," Trump tweeted

McCain promised a show on the way in, and delivered. Reporters and observers in the gallery watched his every movement as he spoke to various senators. At one point, he even huddled with Democrats. As he was speaking to Senate Minority Leader Chuck Schumer and Sen. Dianne Feinstein, other Democrats came closer and closer, forming a large half-circle around the former Republican presidential nominee, who, make no mistake, has worked to thwart Democratic ambitions over the years as well.

JUST WATCHED Schumer gets emotional over McCain Replay More Videos ... MUST WATCH Schumer gets emotional over McCain 00:58

"John McCain is a hero and has courage and does the right thing," Schumer said afterwards.

Sen. Chris Coons, a Democrat from Delaware, had a feeling even earlier in the day that McCain may be on his side this time.

"We had a brief conversation that was intriguing and then several other senators also had other conversations with him. He was sort of leaving little hints, here and there," Coons said.

After the vote, Senate Majority Leader Leader Mitch McConnell lamented the end result -- McCain joining Republican holdouts Lisa Murkowski and Susan Collins in ending the Obamacare repeal dream for the moment.

"I regret that we're here," McConnell said. "I'm proud of the vote I cast tonight. It's consistent with what we told the American people we'd try to accomplish in four straight election if they gave us a chance."

As McConnell lectured his GOP colleagues for failing to uphold their promises to voters to end Obamacare, McCain sat nearby, hands folded in his lap, with Murkowski by his side, as she had been for most of the night.

Later, as he got into his car to leave the Capitol, McCain was asked, "Why did you vote no?"

He answered simply: "Because it was the right vote."