McCain, who has died at the age of 81, was a naval bomber pilot, prisoner of war, conservative maverick, giant of the Senate, twice-defeated presidential candidate and an abrasive American hero with a twinkle in his eye.
The Arizonan warrior politician, who survived plane crashes, several bouts of skin cancer and brushes with political oblivion, often seemed to be perpetually waging a race against time and his own mortality while striving to ensure that his five-and-a-half years as a Vietnam prisoner of war did not stand as the defining experience of his life.
He spent his last few months out of the public eye in his adopted home state of Arizona, reflecting on the meaning of his life and accepting visits from a stream of friends and old political combatants.
In a memoir published in May, McCain wrote that he hated to leave the world, but had no complaints.
In a memoir published in May, McCain wrote that he hated to leave the world, but had no complaints. "It's been quite a ride. I've known great passions, seen amazing wonders, fought in a war, and helped make peace," McCain wrote. "I've lived very well and I've been deprived of all comforts. I've been as lonely as a person can be and I've enjoyed the company of heroes. I've suffered the deepest despair and experienced the highest exultation.
"I made a small place for myself in the story of America and the history of my times."
McCain had not been in Washington since December, leaving a vacuum in the corridors of the Senate and the television news studios he roamed for decades.
In recent months, he was not completely quiet, however, blasting President Donald Trump in a series of tweets and statements that showed that while he was ailing he had lost none of his appetite for the political fight.
The Arizona Senator repeatedly made clear that he saw Trump and his America First ideology as a departure from the values and traditions of global leadership that he saw epitomized in the United States.
McCain had been planning his funeral services over the last year and his family made clear that Trump is not invited, a position that has not changed, two family friends said Saturday. Former rivals and Presidents Barack Obama and George W. Bush were asked to give eulogies, people close to both former presidents and a source close to the senator told CNN earlier this year.
After McCain leaves Arizona, he will lie in state in the US Capitol this week, a Republican source with knowledge of the plans confirmed to CNN. A service will also be held at the National Cathedral, followed by a private service in Annapolis, Maryland, the source said.
McCain's two losing presidential campaigns meant he fell short of the ultimate political prize, one his story once seemed to promise after he came home from Vietnam and caught the political bug. In the end, he became a scourge of presidents rather than President himself.
At the time of his death, he was largely an anomaly in his own party -- as one of the few Republicans willing to criticize Trump and a believer in the idealized "shining city on a hill" brand of conservatism exemplified by his hero Ronald Reagan that has been dislodged by the nativist and polarizing instincts of the current President. He was also a throwback to an earlier era when political leaders, without betraying their own ideology, were willing on occasion to cross partisan lines.
For his military service, he was awarded the Silver Star, the Bronze Star, the Legion of Merit, a Purple Heart and the Distinguished Flying Cross.
He faced his final diagnosis with characteristic courage, telling CNN's Jake Tapper that "every life has to end one way or another."
Asked how he wanted to be remembered, McCain said: "He served his country, and not always right -- made a lot of mistakes, made a lot of errors -- but served his country, and, I hope we could add, honorably."
McCain, who will be remembered as much for his combative nature as his political achievements, summed up the meaning of a life forged in the example of his political hero Theodore Roosevelt when McCain stood before the flag-draped coffin of his friend and foe, Sen. Kennedy, in 2009.
His late colleague from Massachusetts died from the same form of brain cancer that eventually killed McCain. Both men died on August 25.
"Ted and I shared the sentiment that a fight not joined was a fight not enjoyed."