Wu Zixu, named Yuan, was a native of Chu. His father Wu She and elder brother Wu Shang were both killed by King Ping of Chu. Wu Zixu swore to avenge his father and brother by destroying Chu. He had a close friend, Shen Baoxu, who said to him, "If you insist on destroying Chu, then I will insist on restoring Chu."
To avenge his father's death, Wu Zixu endured countless hardships to reach the state of Wu, where he sought refuge with King Helü. Before the king, Wu Zixu recommended Sun Wu. The king appointed Sun Wu as general and Wu Zixu as his deputy. Sun Wu led the Wu army to attack Chu. At the Battle of Boju, they defeated a Chu army five times their size, a famous victory in Chinese history. Soon, the Wu army captured Yingdu, Chu's capital. By then, King Ping of Chu had already died. Wu Zixu searched for his tomb, dug it up, opened the coffin, and furiously whipped the corpse three hundred times to vent his rage. This act is known as "digging up the grave and whipping the corpse."
When Shen Baoxu saw Wu Zixu's extreme actions—allying with the State of Wu to destroy his own homeland of Chu and even venting his fury on the dead—he sent a messenger with a letter to Wu Zixu, writing, "Your revenge has gone too far. Have you forgotten that you are a man of Chu?" Wu Zixu replied, "For the sake of vengeance, I cannot afford to care. I must carry on with this reckless course."
Then Shen Baoxu sought aid from the State of Qin, but Qin refused. Leaning against a pillar in the Qin court, he wept day and night for seven days and seven nights without ceasing. Duke Ai of Qin was moved and said, "Though the King of Chu is unrighteous, yet he has such a worthy minister—how could the State of Chu be allowed to perish?"
The State of Qin lent him troops, and Shen Baoxu finally restored the State of Chu. This is what people often call "Weeping at the Qin Court." Later, Wu Zixu was killed by the King of Wu, meeting a tragic end. Subsequently, the idiom "acting in a perverse way" came to describe doing things upside down and recklessly violating reason.
Source: *Records of the Grand Historian*, "Biography of Wu Zixu"
Meaning of the Idiom: Later, the Chinese idiom "倒行逆施" came to describe how doing things upside down and recklessly violating reason.