The announcement signals the beginning of the end of a tough battle with an aggressive form of cancer -- and of a storied life that took the Naval Academy graduate from a Hanoi prison to the doorstep of the White House.
"The progress of disease and the inexorable advance of age render their verdict," the 81-year-old senator's loved ones said in a statement.
"With his usual strength of will, he has now chosen to discontinue medical treatment."
McCain, a towering figure in American politics for decades, has spent more than three decades in the upper chamber of Congress, looming large in debates over war and peace and the moral direction of the nation.
The Navy fighter pilot spent years as a prisoner of war in Vietnam after being shot down while on a bombing mission over Hanoi.
He lost the 2008 presidential election to Barack Obama, and was pilloried for selecting controversial Alaska politician Sarah Palin as his vice presidential runningmate.
"No man this century better exemplifies honor, patriotism, service, sacrifice and country first than Senator John McCain," said fellow Republican Mitt Romney.
"His heroism inspires, his life shapes our character. I am blessed and humbled by our friendship."
Trump critic
With no more elections to run, since 2016, he has been a rare and outspoken Republican critic of President Donald Trump.
Known for his combustible temper, he has accused the 45th president of "naivete," "egotism" and of sympathizing with autocrats.
Following Trump's recent summit with Russian President Vladimir Putin, McCain caustically described the US leader's behavior as "one of the most disgraceful performances by an American president in memory."
That has earned him the ire of Trump, who regularly blames McCain for his failure to reform Obama-era health care laws and refused to say his name when signing the eponymous "John S. McCain National Defense Authorization Act."
'Strength to carry on'
McCain has not been on the Senate floor in months, remaining at his Arizona home for treatment of glioblastoma -- the same form of brain cancer that took the life of another Senate giant, Democrat Ted Kennedy, in 2009.
"I love my husband with all of my heart. God bless everyone who has cared for my husband along this journey," his wife Cindy said.
His daughter Meghan thanked the public for an outpouring of support.
"My family is deeply appreciative of all the love and generosity you have shown us during this past year," she tweeted.
"Thank you for all your continued support and prayers. We could not have made it this far without you - you've given us strength to carry on."
Republican Senate Majority Leader Mitch McConnell said he was "very sad to hear this morning's update from the family of our dear friend."
"John, Cindy and the entire McCain family are in our prayers at this incredibly difficult hour."
Democrats, too, weighed in.
"Senator John McCain is a warrior in every sense of the word," said Congressman Joe Kennedy III -- a scion of the American political dynasty.
"To an inspiring man and a loving family, our thoughts are with you."
'Untreatable levels'
John Boockvar, director of the Brain Tumor Center at Lenox Hill Hospital in New York, said the type of cancer is "incurable."
"He is probably at the terminal part of his disease," Boockvar, who has not treated McCain but is an expert in the field, told AFP.
"They have decided not to extend any other options to him for treatment because at some point, the risks outweigh the benefits."
Treatment usually consists of chemotherapies, with a low chance of success.
Boockvar said the cancer had likely "spread to untreatable levels and he is seeking comfort care, which is a very reasonable point of his battle against this disease."
In an interview with CNN last year, when asked how he might like to be remembered, McCain said of himself: "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."