The 75-year-old monarch is undergoing treatment and has been advised by doctors "to postpone public-facing duties," the statement continued.
"The King is grateful to his medical team for their swift intervention, which was made possible thanks to his recent hospital procedure. He remains wholly positive about his treatment and looks forward to returning to full public duty as soon as possible," the palace said.
The palace added that the king "has chosen to share his diagnosis to prevent speculation and in the hope it may assist public understanding for all those around the world who are affected by cancer."
FILE - : King Charles III leaves The London Clinic on Jan. 29, 2024 in London, England. (Karwai Tang/WireImage)
Charles became king in September 2022 when his mother Queen Elizabeth II died at the age of 96.
News of the king's diagnosis comes as his daughter-in-law Kate, Princess of Wales, recovers from abdominal surgery that saw her hospitalized for about two weeks.
The king personally called both William and Harry — as well as his siblings Princess Anne, Prince Andrew and Prince Edward — to share news of his health.
Harry, who quit royal duties in 2020, has spoken to his father about the diagnosis and "will be traveling to U.K. to see His Majesty in the coming days," said the office of Harry and his wife, Meghan.
U.K. political leaders sent messages of support. Prime Minister Rishi Sunak tweeted: "Wishing His Majesty a full and speedy recovery. I have no doubt he’ll be back to full strength in no time and I know the whole country will be wishing him well."
Last month, Charles was diagnosed with an enlarged prostate after experiencing undisclosed symptoms and underwent surgery.
The Associated Press contributed to this report. This story was reported from Los Angeles.