The senator's passing marked the end of a 35-year political career that brought the independent-minded Republican within reach of the White House as his party's presidential nominee. (READ: John McCain, unbridled titan of American politics)
"It's been quite a ride," McCain, who was tortured during 5 years as a prisoner of war in Vietnam, wrote in a memoir published in May.
"I've known great passions, seen amazing wonders, fought in a war and helped make peace. I made a small place for myself in the story of America and the history of my times."
McCain, who was being treated at his ranch near Sedona, Arizona, was surrounded by his wife Cindy and his family during his final hours.
"He was a great fire who burned bright, and we lived in his light and warmth," said Meghan McCain, one of the late senator's 7 children – 3 of them from a previous marriage.
Near the driveway to his ranch a sign read "Sen McCain, thank you for your service."
In Washington, flags on Capitol Hill and the White House were lowered to half mast in his honor.
McCain's body will lie in state in the Capitol rotunda ahead of a funeral ceremony at the National Cathedral, the New York Times reported. He will then lie in state in the Arizona state capitol and be buried at Naval Academy in Annapolis, Maryland. Dates for the events have not yet been announced.
McCain made it known that he did not want Donald Trump to attend his funeral, US media reported.
'All in his debt'
President Trump, who once mocked McCain's war record, said he sent his "deepest sympathies and respect."
A rare Republican critic of Trump, McCain accused the president of "naivete," "egotism" and of sympathizing with autocrats. He cast a decisive vote last year that killed Republican attempts to repeal Barack Obama's health care reforms, something Trump never forgave.
All living former US presidents lined up to praise McCain's deep integrity.
"We are all in his debt," said Obama, the Democrat to whom McCain lost the presidency in 2008.
"We shared, for all our differences, a fidelity to something higher -- the ideals for which generations of Americans and immigrants alike have fought, marched and sacrificed."
McCain "was a man of deep conviction and a patriot of the highest order," said Republican George W. Bush (2001-2009).
The late senator requested that both Obama and Bush deliver eulogies at his funeral, US media reported.
Democrat Bill Clinton (1993-2001) praised McCain, saying he "frequently put partisanship aside," while Republican George H. W. Bush (1989-1993) hailed him as "a public servant of the rarest courage."
McCain "was a man of honor, a true patriot in the best sense of the word," wrote Democrat Jimmy Carter (1977-1981). "Americans will be forever grateful for his heroic military service & his steadfast integrity."
'Atlanticist,' Israel supporter
McCain spent more than 3 decades in the Senate, looming large in debates over war and peace and the moral direction of the nation. Earlier he served as a US representative 1983-1987.
McCain had been away from the Senate floor since December, remaining at his ranch for treatment of glioblastoma – the same form of brain cancer that took the life of another Senate giant, Democrat Ted Kennedy, in 2009.
Two former senators who became vice presidents, Democrats Al Gore and Joe Biden, praised McCain respectively as someone who would "work to find common ground" and "a friend" who "will be missed dearly."
Sarah Palin, whom McCain plucked from obscurity to become his 2008 White House running mate, described him as "an American original" and "a fighter, never afraid to stand for his beliefs."
Top Senate Democrat Chuck Schumer said he would seek to rename a Senate building in his honor.
From abroad, Canadian Prime Minister Justin Trudeau said McCain's "lifetime of public service" was "an inspiration to millions," while Israeli Prime Minister Benjamin Netanyahu praised him as "a great American patriot" whose "support for Israel never wavered."
NATO Secretary General Jens Stoltenberg said McCain would be remembered as an "Atlanticist" and NATO supporter, while Germany's Foreign Minister Heiko Maas said he "stood for an America that is a reliable and close partner ... that takes responsibility for others out of strength, and stands by its values and principles."
Across the Pacific, the China Daily referred to him as a "titan of American politics" and "conscience of the Republican party."
Praise for McCain however was not universal: comments on the far-right Breitbart website slammed him for voting against the Obamacare repeal. Some even revived a debunked smear that McCain divulged secrets when he was a Vietnamese prisoner and participated in propaganda films.
Chinese social media users called him an "enemy of China" for his hawkish foreign policy views.
"Another anti-China warrior is down, godspeed, you can finally rest, there’s no China in heaven," wrote one user on the Twitter-like Weibo. – Rappler.com