Emperor Zhaozong of Tang child Li Yu, Prince Di
Removal and restoration
Meanwhile, also rising in power at court was the chancellor Cui Yin, who hated the eunuchs ardently and who was allied with Zhu Quanzhong.  By 900, Emperor Zhaozong, who had come to trust Cui and who would later describe him as "faithful but trickier" (than Han Wo, the official the emperor was making the comment to) was planning with Cui to slaughter the eunuchs.  When Cui's fellow chancellor Wang Tuan urged against such action, believing the plans to be too drastic, Cui accused Wang of being in league with the powerful eunuchs Zhu Daobi (朱道弼) and Jing Wuxiu (景務脩), who served as the directors of palace communications (Shumishi).  Upon Cui's accusations, Emperor Zhaozong ordered Wang, Zhu Daobi, and Jing to commit suicide, and it was said that from this point Cui became the leading figure at court, with the eunuchs angry at and fearful of him.The eunuchs also had become fearful of Emperor Zhaozong himself, who, after returning from Hua Prefecture, was described to be depressed, alcoholic, and unpredictable in his temperament.  The four top-ranked eunuchs—Liu Jishu and Wang Zhongxian (王仲先) the commanders of the Shence Armies, and Wang Yanfan (王彥範) and Xue Qiwo (薛齊偓) the new directors of palace communications—began plotting to remove him.  After an incident in winter 900 in which Emperor Zhaozong, in a drunken rage, killed several attending eunuchs and ladies in waiting, Liu Jishu led Shence Army troops into the palace and forced Emperor Zhaozong to yield the throne to his son Li Yu, Prince of De the Crown Prince.  Emperor Zhaozong and his wife (Li Yu's mother) Empress He were honored as retired emperor (Taishang Huang) and retired empress (Taishang Huanghou) but put under house arrest.  Li Yu, whose name the eunuchs changed to Li Zhen, was proclaimed emperor, but the eunuchs controlled the court.  They wanted to kill Cui, but was fearful that Cui's ally Zhu Quanzhong might react violently, so they only relieved Cui from his secondary posts as the director of finances and the director of salt and iron monopolies.Cui, in turn, was in communications with Zhu, plotting to restore the emperor.  He also persuaded the Shence Army officer Sun Dezhao (孫德昭) to join his cause, and Sun in turn persuaded his fellow officers Dong Yanbi (董彥弼) and Zhou Chenghui (周承誨) to join.  In spring 901, they acted.  They first ambushed and killed Wang Zhongxian, and captured Liu and Wang Yanfan, who were then killed by caning.  Xue tried to commit suicide by drowning, but was taken out of the water and decapitated.  Emperor Zhaozong was restored to the throne.  In gratitude to the three officers, he bestowed the imperial clan name of Li on them, renaming them Li Jizhao (李繼昭), Li Yanbi (李彥弼), and Li Jihui (李繼誨) respectively.
offspring progeny issue descendant heir