The 80-year-old lawmaker and former Navy pilot, who was re-elected to a sixth Senate term in November, has been recovering at home in Arizona since undergoing surgery at the Mayo Clinic in Phoenix last Friday to remove a blood clot from above his left eye.
Tissue analysis since that procedure revealed that a brain tumour known as a glioblastoma was associated with the clot, his office said.
Glioblastoma is considered a grade IV tumour, the most malignant of gliomas. It can be very aggressive and spread into other parts of the brain quickly, according to the MD Anderson Cancer Center.
McCain's doctors said he was recovering from his surgery "amazingly well" and that his underlying health was excellent.
His treatment options include a combination of chemotherapy and radiation, his office said.
"The news of my father's illness has affected every one of us in the McCain family," McCain's daughter Meghan said in a statement on Twitter. "My grandmother, mother, brothers, sister, and I have all endured the shock of the news, and now we live with the anxiety about what comes next."
She said the family was familiar with the experience of battling cancer since her father had fought it previously, and that through all of this, McCain himself was the "most confident and calm" of all of them.
His fellow members of Congress rushed to offer tributes to the lawmaker and wishes for his quick recovery. Known for an independent political streak, ready wit and strong opinions, McCain is one of the best-known and most popular U.S. lawmakers among his peers and the media.
While known as a fierce advocate for strong U.S. military action overseas, McCain also has a reputation for working with Democrats on issues from clamping down on campaign finance abuses to immigration reform.
U.S. President Donald Trump said that "Senator John McCain has always been a fighter," adding: "Get well soon."
Former Democratic President Barack Obama, who defeated McCain for the presidency in 2008, called McCain "an American hero and one of the bravest fighters I've ever known. Cancer doesn't know what it's up against. Give it hell, John."
Senate Majority Leader Mitch McConnell called McCain, the chairman of the Armed Services Committee, a hero and said he looked forward to having him back in Washington.
"We all look forward to seeing this American hero again soon," McConnell said in a statement.
McCain, the son and grandson of admirals, was a U.S. Navy pilot. His plane was shot down over Vietnam in 1967 and he spent 5-1/2 years as a prisoner of war, suffering repeated torture by his Communist captors.
One of McCain's proudest moments as a U.S. senator was working to pass legislation banning torture in 2015.
When he was offered release because of his father's rank, McCain refused to be freed before those who had been held captive longer. He finally returned to the United States in 1973, with other prisoners of war.
Steve Duprey, a Republican National Committee member from New Hampshire who is one of McCain's close friends, said it was a "tough challenge" but that McCain had overcome adversity before.
"I'm sure he will tackle this one the way he has with every other: With grit, determination and his sense of humour. And he has important work to keep doing for the country, and he will," he told Reuters.
McCain was already a cancer survivor, having had non-invasive melanomas removed at least three times.
(This story has not been edited by NDTV staff and is auto-generated from a syndicated feed.)
Follow NDTV for latest election news and live coverage of assembly elections 2019 in Maharashtra and Haryana.
Subscribe to our YouTube channel, like us on Facebook or follow us on Twitter and Instagram for latest news and live news updates.