The 80-year-old Republican has glioblastoma, an aggressive cancer, according to doctors at the Mayo Clinic in Phoenix.
The Arizona senator and his family are reviewing further treatment, including a combination of chemotherapy and radiation.
The five-year survival rate for glioblastoma patients over 55 is about four per cent.
Patients fare best when surgeons can cut out all the visible tumour, which happened with McCain, according to his office.
However, cancerous cells that are not visible still tend to lurk, which is why McCain’s doctors are considering treatment including chemotherapy and radiation.
Terrible news about our great friend @SenJohnMcCain.
Australia’s thoughts and prayers are with him for a speedy recovery.
— Joe Hockey (@JoeHockey) July 20, 2017
John McCain is an American hero & one of the bravest fighters I’ve ever known. Cancer doesn’t know what it’s up against. Give it hell, John.
— Barack Obama (@BarackObama) July 20, 2017
The chairman of the Senate armed services committee had been recovering at home and his absence forced Republican Majority Leader Mitch McConnell to delay action on healthcare legislation.
In a statement, McConnell said: “John McCain is a hero to our conference and a hero to our country. He has never shied from a fight and I know that he will face this challenge with the same extraordinary courage that has characterised his life.”
McCain was the Republican presidential nominee in 2008, when he and running mate Sarah Palin lost to Barack Obama.
He lost the Republican nomination to George W Bush in 2000.
A navy pilot, he was shot down over Vietnam and held as a prisoner for five years.
Doctors say McCain is recovering from his surgery very well and his underlying health is excellent.
In a statement on Twitter, his daughter, Meghan McCain, said: “My love for my father is boundless and like any daughter I cannot and do not wish to be in a world without him. I have faith that those days remain far away.”
Local News Matters
Media diversity is under threat in Australia – nowhere more so than in South Australia. The state needs more than one voice to guide it forward and you can help with a donation of any size to InDaily. Your contribution goes directly to helping our journalists uncover the facts. Please click below to contribute to InDaily.