The Royal Household Bureau said the 86-year-old king, the world's longest-serving monarch who is treated as a near-deity in politically turbulent Thailand, left the hospital for his coastal palace in the town of Hua Hin to the south.
Hundreds of Thais, many wearing the royal yellow colour, waved flags as the convoy carrying Bhumibol, who is officially King Rama IX, left the Siriraj hospital.
A separate van carried 82-year-old Queen Sirikit.
The king arrived from Hua Hin in early August for "a thorough medical check-up which needs special equipment", the Royal Household Bureau said at the time.
More From This Section
Bhumibol, a keen saxophonist, photographer and sailor who is also a father figure to Thais, has made several appearances during his hospital stay.
He has been called on formally to endorse the kingdom's new government and prime minister, Prayut Chan-O-Cha -- the army chief who seized power from the elected administration on May 22.
Born on December 5, 1927 in the United States, Bhumibol came to the throne aged 18 in 1946.
Thais see him as a unifying figure during a reign that has been marked by political turmoil in the bitterly divided country.
The latest chapter of Thailand's political drama has lasted nearly a decade, with the kingdom roiled by political unrest -- and periodic bouts of violence -- since billionaire former premier Thaksin Shinawatra was toppled in an earlier coup in 2006.