By the time Ding Baozhen arrived in Shandong, he was no longer simply the scholar who had taken up arms to defend his homeland. His courage on the battlefield and his ability to restore order had earned him recognition within the Qing government. In 1863, the iron-willed statesman Ding was appointed Judicial Commissioner of Shandong Province. He was later promoted to Provincial Treasurer and eventually became Governor of Shandong, placing him in charge of one of the Qing Empire’s most important regions.
It was during his years in Shandong that Ding faced the most politically dangerous challenge of his career. The person standing before him was not an ordinary criminal, nor merely another corrupt official. He was An Dehai — the powerful eunuch favored by Empress Dowager Cixi, one of the most influential figures in the Qing court. To challenge An Dehai was to challenge a man protected by the highest levels of imperial power. For many officials, such a confrontation would have been unthinkable. But Ding Baozhen believed that justice could not be compromised by rank or privilege. The decision he was about to make would test not only his authority as a governor, but also his courage, judgment, and unwavering commitment to principle.
The eunuch who believed he was above the law
An Dehai, often known as “Little An,” was one of Empress Dowager Cixi’s most trusted palace eunuchs. Because of Cixi’s deep confidence in him, his influence at court grew rapidly. Over time, he became increasingly arrogant, using his position to intimidate officials and disregard established customs. He openly showed disrespect even toward the young Tongzhi Emperor and his uncle, Prince Gong (Yixin), one of the most influential members of the imperial family.
In the summer of 1869, as preparations were being made for the Tongzhi Emperor’s wedding, An Dehai persuaded Cixi to allow him to travel south to obtain imperial wedding garments. At first glance, the assignment appeared to be a routine palace errand. But beneath the surface, it represented a serious violation of Qing law. According to imperial regulations, palace eunuchs were strictly forbidden from leaving the capital unless they carried an official commission issued through the proper government channels. Any eunuch who left the palace without authorization could face the death penalty.
Protected by Cixi’s favor, An Dehai believed these restrictions no longer applied to him. He departed Beijing in great splendor, traveling south along the Grand Canal aboard two magnificent boats. Large banners announced: “Imperial Commissioner, Acting by Order of the Throne.” Wherever he stopped, local officials were expected to receive him with elaborate banquets, expensive gifts, and every accommodation he demanded. Many complied out of fear. But beneath their outward obedience, resentment quietly grew. To many officials, An Dehai had come to represent the dangerous corruption that occurred when personal influence placed someone above the law.

A carefully planned trap
When news reached Ding Baozhen that An Dehai’s flotilla had entered Shandong Province, local officials were alarmed. No one wanted to offend the Empress Dowager’s favored eunuch. Ding Baozhen, however, saw the situation differently. He understood the enormous risks involved, but he also recognized a crucial opportunity. If he had followed ordinary procedures and first submitted a request to the capital for permission to arrest An Dehai, the matter would inevitably have reached Empress Dowager Cixi. A single imperial decree from her could shield An Dehai from punishment — and leave Ding himself facing severe consequences for challenging someone under her protection. But Ding had discovered something far more important. An Dehai did not possess the official travel documents required by law. He had left the capital without proper authorization. That one violation changed everything.
Legally, he was no longer a representative of the imperial court. He was a lawbreaker. Ding moved swiftly. Without alerting An Dehai’s entourage, he secretly instructed officials along the route to monitor their movements. Additional troops were quietly positioned nearby, waiting for the right moment to act. Only after every detail had been carefully arranged did Ding give the order. An Dehai and his attendants were arrested near Tai’an and escorted under heavy guard to Jinan, the provincial capital. But Ding’s strategy did not end with the arrest.
At the same time, he launched the second part of his plan. Instead of sending his memorial directly to Empress Dowager Cixi, he addressed it to Empress Dowager Ci’an, the Tongzhi Emperor, and Prince Gong (Yixin) — figures who had long been concerned about the growing influence of palace eunuchs. In a formal memorial — a written petition submitted to the imperial court — Ding argued that allowing a eunuch to disregard imperial law would undermine the authority of the throne itself and threaten the court’s stability. If such a violation went unpunished, he warned, the discipline and order of the imperial palace would eventually collapse.
Justice before politics
Ding Baozhen’s bold decision was met with an unexpected turn of events. When his memorial reached Beijing, Empress Dowager Cixi and Prince Gong recognized a rare opportunity. Empress Dowager Cixi happened to be absent from court that day due to illness, leaving her influential eunuch without his strongest protection. Acting swiftly, they prepared a secret imperial decree in the name of the Tongzhi Emperor and sent it urgently back to Shandong. The order was brief and decisive: “Arrest the eunuch surnamed An with utmost secrecy… No further interrogation is required. Carry out the execution immediately.”
When the decree arrived in Jinan on the seventh day of the eighth lunar month in 1869, Ding Baozhen acted without hesitation. He gathered the provincial officials, publicly read the imperial command, and calmly ordered it to be carried out. An Dehai was taken directly to the execution ground. Within moments, the sentence was completed. From the time of An Dehai’s arrest to his execution, only five days had passed. The swift action left no opportunity for intervention. Before Empress Dowager Cixi could respond, the powerful eunuch who had long believed himself beyond the reach of the law was gone. For Ding Baozhen, the matter was not about personal ambition or political rivalry. It was about a principle he had carried throughout his life: even the most powerful individuals must remain accountable to the law.

A nation astonished
News of An Dehai’s execution spread throughout the empire with astonishing speed. Officials across China were stunned. Many could hardly believe that anyone had dared to execute the most powerful eunuch in the Qing court — a man who had enjoyed the personal favor of Empress Dowager Cixi herself. Among those who heard the news was the renowned statesman Zeng Guofan, who was then living in retirement while suffering from a serious eye ailment. According to contemporary accounts, his condition had made it difficult for him to open his eyes comfortably for months. Yet when he learned what Ding Baozhen had done, he was reportedly so moved that he opened his eyes wide, clapped his hands, and exclaimed: “Ding Baozhen is truly a heroic man!”
The story soon spread and became legendary. To ordinary people, Ding had proven that even those closest to imperial power could not stand above the law. To upright officials, he became a symbol of moral courage — not reckless defiance, but the courage to uphold principle with wisdom and careful judgment. By placing justice above personal safety and political convenience, the iron-willed statesman Ding earned admiration throughout the empire. Yet for Ding Baozhen, An Dehai’s execution was not the greatest achievement of his life. A greater test awaited him. In Sichuan, he would spend the next decade transforming his principles into action. There, his courage as a statesman would be joined by something even more enduring: his compassion for the people he served.
See Part 1 here
Translated by Katy Liu and edited by Tatiana Denning
Follow us on X, Facebook, or Pinterest