After Emperor Xianzong of the Tang Dynasty ascended the throne, he appointed a group of talented ministers, which allowed for the reform of government administration. Through the policy of reducing the power of regional military governors, he weakened their influence, restored the court's authority, and initiated a period of revival for the Tang Dynasty. However, Emperor Xianzong later became arrogant and complacent, began to believe in immortality and Daoist practices, neglected state affairs, and was ultimately killed by eunuchs.
After Emperor Xianzong of Tang died, the eunuchs Wang Shoucheng and Chen Hongzhi installed Li Heng as emperor, who became Emperor Muzong of Tang. After Emperor Muzong died of illness, his son Li Zhan was made emperor, known as Emperor Jingzong of Tang. Upon ascending the throne, Emperor Jingzong spent his days indulging in pleasure and completely neglected state affairs; after only two years as emperor, he was killed by eunuchs. Following Emperor Jingzong's death, the eunuch Liu Kemin and others, falsely acting in the emperor's name, attempted to install Li Wu as emperor and used this opportunity to suppress other eunuchs. The Inner Commissioner Wang Shoucheng, enraged, welcomed Emperor Jingzong's younger brother Li Han to the throne. Court officials led by Pei Du strongly supported Wang Shoucheng, so Wang ordered the imperial guard generals to kill Li Wu and others, establishing Li Han as emperor. After ascending the throne, Li Han changed his name to Li Ang, becoming Emperor Wenzong of Tang.
After Emperor Wenzong of Tang ascended the throne, Wang Shoucheng and others were favored for their support in his succession. Unable to tolerate eunuch domination, Emperor Wenzong planned to use court officials to oppose the eunuchs.
In 831 AD, Emperor Wenzong of the Tang Dynasty secretly plotted with Prime Minister Song Shenxi to eliminate the eunuchs, but the plan failed when it was leaked by the capital's governor. Undeterred, two years later, after falling seriously ill, Emperor Wenzong was introduced by Wang Shoucheng to a skilled physician named Zheng Zhu.
Zheng Zhu not only cured Emperor Wenzong of the Tang Dynasty of his illness but also gained the emperor's trust, becoming his close confidant. Later, Wang Shoucheng recommended the scholar Li Xun to Emperor Wenzong. The emperor believed that since Zheng Zhu and Li Xun were recommended by Wang Shoucheng, plotting with them to eliminate the eunuchs would not arouse Wang Shoucheng's suspicion. Thus, Emperor Wenzong secretly discussed the removal of the eunuchs with Zheng Zhu and Li Xun, promoting Li Xun to the position of Hanlin Academician Reader and Zheng Zhu to Grand Coachman. The following year, Emperor Wenzong further elevated Li Xun to Chancellor and appointed Zheng Zhu as the Military Governor of Fengxiang. Li Xun and Zheng Zhu lived up to the emperor's high expectations, successfully eliminating Wang Shoucheng, Chen Hongzhi, and others.
After this, the eunuch Qiu Shiliang, who held real power over the imperial guard, became the target of Emperor Wenzong of Tang.
Zheng Zhu and Li Xun originally planned that on the day of Wang Shoucheng's burial, Zheng Zhu would lead troops to guard the funeral while requesting Emperor Wenzong of Tang to order all eunuchs below the rank of Commander of the Divine Strategy Army to attend the burial procession by the river, where they would seal the tomb gate and have armed personal guards kill the eunuchs. However, Li Xun feared that if the plan succeeded, all credit for eliminating the eunuchs would go to Zheng Zhu. So, he conspired with his allies to have Guo Xingyu and others recruit more private soldiers while mobilizing the Imperial Guard led by Han Yue, along with the Censorate and the Capital Prefecture's forces, to eliminate the eunuchs before Zheng Zhu could act, and then remove Zheng Zhu afterward. Li Xun only discussed this plot with a few allies and Prime Minister Shu Yuanyu, while all other court officials remained completely unaware.
One morning, Emperor Wenzong of Tang summoned all his officials. General Han Yue, the commander of the Left Jinwu Guard, did not report as usual that all was well, but instead announced: "Last night, sweet dew descended on the pomegranate tree in the backyard of the Left Jinwu headquarters—this is an auspicious omen." Han Yue then bowed and offered congratulations, and the Prime Minister led all the officials in congratulating Emperor Wenzong. Li Xun and Shu Yuanyu both urged the emperor to go and see it for himself, to receive this heavenly blessing.
Emperor Wenzong of Tang was very eager to go see it himself, so he first sent the Prime Minister and officials from the Zhongshu and Menxia provinces to inspect the sweet dew at the Left Jinwu rear courtyard. After a long time, those people returned, and Li Xun reported: "We have examined it, and it does not appear to be genuine sweet dew; we cannot rush to announce it to the whole country, otherwise all regions will send congratulations to Your Majesty." Emperor Wenzong then sent the commanders of the Left and Right Shence Armies, Qiu Shiliang and Yu Hongzhi, to lead the eunuchs to inspect it again.
Qiu Shiliang led the eunuchs to the Left Jinwu rear courtyard to inspect the sweet dew. Han Yue was extremely nervous, his legs trembling uncontrollably. Qiu Shiliang sensed something was wrong and asked him why he was acting this way. After a moment, a gust of wind lifted the tent curtains in the courtyard, revealing many soldiers holding weapons, and the clashing sounds of their arms reached their ears. Qiu Shiliang and the others were greatly alarmed and quickly ran out, managing to escape before the guards at the gate could close it.
Qiu Shiliang and his men rushed to Hanyuan Hall to report to Emperor Wenzong of Tang that a mutiny had broken out. Li Xun, who happened to be there at the time, shouted to the Imperial Guard soldiers, "Come quickly to the hall to protect the emperor—each of you will receive a generous reward!"
Chou Shiliang said to Emperor Wenzong, "This is urgent, please return to the palace quickly!" He then helped Emperor Wenzong into a sedan chair and hurried north.
Li Xun grabbed the sedan chair carrying Emperor Wenzong and refused to let go, shouting, "I still have state affairs to report—Your Majesty cannot return to the palace!" By then, the Imperial Guard troops had already ascended Hanyuan Hall. At the same time, Li Xiaoben led over two hundred attendants from the Censorate charging in from the west, while Luo Liyan led more than three hundred patrol soldiers from the capital prefecture rushing in from the east. Together, they stormed Hanyuan Hall to attack the eunuchs, slashing until blood gushed and the eunuchs cried out in grievance. Over a dozen eunuchs were either killed or wounded. Emperor Wenzong scolded Li Xun, and the eunuch Xi Zhirong seized the opportunity to punch Li Xun in the chest, knocking him to the ground. Once the sedan chair entered Xuanzheng Gate, the gate was immediately shut behind it, and the eunuchs shouted, "Long live the Emperor!" The court officials who were attending the morning assembly at Hanyuan Hall were so terrified that they scattered in all directions. Seeing that Emperor Wenzong had already retreated into the inner palace, Li Xun realized the situation was hopeless, so he changed into a green official robe of a lower-ranking attendant, mounted a horse, and fled.
Learning that Emperor Wenzong of Tang was involved in Li Xun's secret plot, the eunuch Qiu Shiliang and his associates were filled with indignation and subjected the emperor to humiliation. Overcome with fear, Emperor Wenzong had no choice but to swallow his anger and endure the disgrace.
Qiu Shiliang and others ordered the deputy commanders of the Left and Right Shence Armies, Liu Tailun and Wei Zhongqing, to each lead five hundred imperial soldiers, armed and in full view, charging out from the Zichen Hall to suppress the rebels. Prime Minister Wang Ya and other officials were about to have lunch in the government affairs hall when they suddenly heard that a large group of soldiers had rushed out from the palace, killing everyone in their path. Wang Ya and his colleagues fled in panic. Over a thousand soldiers and officials from the Zhongshu and Menxia provinces, as well as the Jinwu Guard, all scrambled to escape through the gates.
Qiu Shiliang then ordered troops to seal off all palace gates, conduct a thorough search of the various government offices in the southern administrative district, and arrest the "rebel faction." As a result, all officials, guards on duty, civilians selling wine, and merchants inside those offices were killed, with over a thousand dead, blood flowing like rivers, and the official seals, office supplies, and many other items of each department either destroyed or looted. Qiu Shiliang and his men also dispatched over a thousand cavalry outside the city to pursue the fleeing "rebel faction," while simultaneously sending troops to conduct a comprehensive manhunt throughout the capital.

Shu Yuanyu changed his clothes and fled alone on horseback through the Anhua Gate, but was caught and arrested by pursuing cavalry. Wang Ya was arrested in a tea house in Yongchang Ward and taken to the Left Shence Army. Wang Ya, already over seventy years old, could not endure the brutal torture and was forced to falsely confess to conspiring with Li Xun to rebel and attempt to support Zheng Zhu as emperor.
Li Xun's distant cousin Li Yuangao served as a Vice Director of the Ministry of Revenue in the imperial court, but in reality, Li Yuangao had never been promoted or favored by Li Xun; nevertheless, he was arrested and killed. Hu Zheng, the former governor of Lingnan Circuit, was a great wealthy man in the capital, and his riches aroused the greed of the imperial guard soldiers, who then found an excuse to search his home, where his son was also captured and killed. At this time, local thugs in the capital also took the opportunity to settle personal scores, killing people at will and looting the property of merchants and commoners without cause, plunging the entire capital into chaos.
A few days later, when all officials went to the morning court session, the Jianfu Gate on the right side of the Daming Palace did not open until after sunrise. Each official was only allowed to bring one attendant inside, where the imperial guards were fully armed and on high alert. When they reached the Xuanzheng Gate, it had not yet opened. Without the leadership of the Grand Councilor and the Imperial Censor, the officials' procession was in complete disarray and did not form proper ranks. Emperor Wenzong of Tang arrived at the Zichen Hall and asked why the Grand Councilor had not come. Qiu Shiliang replied, "Grand Councilor Wang Ya and others were involved in a rebellion and have been arrested and thrown into prison." After saying this, he presented Wang Ya's confession to Emperor Wenzong. The emperor summoned Left Chief Minister Linghu Chu and Right Chief Minister Zheng Tan to examine the confession. Deeply distressed, Emperor Wenzong asked them whether the handwriting was indeed Wang Ya's. Upon receiving an affirmative answer, he said, "If this is true, then his crime is so severe that even death cannot atone for it!" He then ordered Linghu Chu and Zheng Tan to participate in formulating government policies and also commanded Linghu Chu to draft an imperial edict announcing the suppression of the rebellion led by Li Xun and Wang Ya to the court and the realm. In the edict, Linghu Chu only made vague references to Wang Ya's rebellion without addressing the core issues, which incurred the displeasure of Qiu Shiliang and others. As a result, Linghu Chu was not promoted to Grand Councilor.
At this time, the chaotic situation in the capital's neighborhoods and markets had not yet been resolved. The imperial court ordered generals Yang Zhen and Jin Suiliang of the Left and Right Divine Strategy Armies to each lead five hundred men to guard the main intersections of the streets, beating street drums to warn the people, and executed over a dozen criminals, which finally stabilized the situation.
Li Xun fled to Mount Zhongnan, seeking refuge with his old friend, the monk Zongmi. Zongmi initially planned to shave Li Xun's head and disguise him as a monk to hide him in the temple. However, Zongmi's disciples feared that Li Xun would bring disaster upon the temple, so they refused to take him in. Forced to leave the mountain, Li Xun intended to go to Fengxiang to seek help from Zheng Zhu. As he was heading to Fengxiang, Song Chu, the military commander of Zhouzhi, arrested him, put him in chains, and sent him to the capital. When they reached Kunming Lake, Li Xun, knowing the ruthless methods of the Divine Strategy Army, feared he would be brutally tortured and humiliated. He said to his escorts, "Whoever captures me will receive a great reward and become wealthy and noble! I've heard that the imperial guards are searching everywhere for me; if they see me, they will surely take me away. You'd be better off killing me and sending my head to the capital!" The escorts agreed, so they killed Li Xun and delivered his head to the capital.
The Left Shence Army dispatched three hundred soldiers, carrying Li Xun's severed head at the front while escorting Wang Ya, Luo Liyan, and Guo Xingyu in the rear; the Right Shence Army also sent three hundred soldiers, escorting Shu Yuanyu and Li Xiaoben to the Imperial Ancestral Temple and the Altar of Land and Grain for sacrificial offerings, after which they were paraded through the East and West Markets for public display, with all officials ordered to watch. Following the parade, the eunuchs executed them by waist-cutting at the marketplace, and their heads were hung outside Xing'an Gate for public exhibition. Li Xun's relatives, regardless of closeness or distance, young or old, were all brutally murdered.
This is the famous "Sweet Dew Incident" in history. Afterward, the eunuchs became even more unscrupulous, completely disregarding Emperor Wenzong of Tang and the court officials. In 840 AD, Emperor Wenzong died in grief and indignation.