BANGKOK—Thailand’s King Bhumibol Adulyadej, the world’s longest-serving monarch, died Thursday aged 88, heralding a potential new bout of instability for the politically volatile country and its military rulers.

News from the royal palace Sunday that the revered king, who suffered for years from numerous ailments, was in unstable condition triggered outpourings of grief and days of anxious vigils outside Bangkok’s Siriraj Hospital, where he had been placed on a ventilator. The country’s stock market swooned and some Thais...