When Emperor Ling became critically ill in 189, he secretly entrusted an eight-year-old
Liu Xie to a close aide and eunuch,
Jian Shuo. Upon the emperor's death, Jian Shuo attempted to lure
He Jin into a trap in the palace, assassinate him, and then install Liu Xie on the throne. Jian Shuo's plan to make Liu Xie emperor ultimately failed, so a 13-year-old Liu Bian was enthroned and became historically known as Emperor Shao. Empress He, as the emperor's mother, became
empress dowager and attended imperial court sessions alongside her son. As Emperor Shao was still young, General-in-Chief He Jin and
Grand Tutor Yuan Wei () served as his
regents. In the summer of 189, after learning that Jian Shuo wanted to assassinate him, He Jin and his supporters launched a preemptive move against the eunuch and had him arrested and executed. Months later,
Yuan Shao suggested to He Jin to eliminate the
eunuch faction and consolidate power. Although Empress Dowager He strongly objected to He Jin's plan, the General-in-Chief, acting on Yuan Shao's advice, attempted to push his idea. He instigated a few regional warlords to lead their troops into the vicinity of
Luoyang, the imperial capital, and openly demand that the eunuchs be executed – in the hope of pressuring Empress Dowager He into agreeing. The empress dowager, however, sided with and protected the eunuchs. In retaliation, the eunuchs hatched a plot to assassinate He Jin: they issued a fake imperial order in Empress Dowager He's name, instructing He Jin to enter the imperial palace, where he fell into an ambush and was killed by the eunuchs. After He Jin's death, his subordinates Wu Kuang () and Zhang Zhang (), along with
Yuan Shao,
Yuan Shu and others, led their troops to storm the palace and kill the eunuchs in revenge. They indiscriminately slaughtered anyone who looked like a eunuch; some young men who had no facial hair, in desperation, dropped their pants in front of the soldiers to prove that they were not eunuchs. During the attack, the eunuchs took Emperor Shao, the
Prince of Chenliu (Liu Xie) and Empress Dowager He hostage and tried to flee from the palace.
Lu Zhi intercepted the eunuch Duan Gui () and saved the empress dowager from him. He Jin's younger brother, He Miao, who was sympathetic towards the eunuchs, was killed by Wu Kuang and Dong Min (). Over 2,000 people died in the attack. Emperor Shao and Liu Xie, who were taken out of the palace by the eunuchs during the chaos, were eventually found near the riverbank and saved by Lu Zhi and Min Gong (). As Lu Zhi and Min Gong were escorting the emperor and prince back to the imperial palace, they were intercepted by forces under the command of
Dong Zhuo, one of the warlords initially summoned by He Jin to put pressure on Empress Dowager He. When Dong Zhuo met them, Emperor Shao was so shocked that he could not express his thoughts clearly. In contrast, Liu Xie had no difficulty in describing what happened and, in Dong Zhuo's impression, behaved more like an emperor than Emperor Shao. Dong Zhuo thus conceived the idea of deposing Emperor Shao and replacing him with Liu Xie. == Deposal and death ==