By then, Dong Zhuo had already woken up. He came out of the garden and saw Lü Bu embracing Diao Chan. Furious, he shouted, 'You treacherous villain, how dare you deceive me!' He then grabbed his halberd and hurled it at Lü Bu. Lü Bu quickly fled; the halberd scraped against a pillar and missed. Dong Zhuo chased after him, but Lü Bu escaped. Wang Yun heard of this and invited Lü Bu to a secret chamber, where he detailed Dong Zhuo's treachery and stirred Lü Bu's desire for rebellion. Lü Bu, also because of the Diao Chan incident, hated Dong Zhuo to the bone, so he made a plan with Wang Yun to kill Dong Zhuo.
Wang Yun conspired with Lü Bu, Shi Sunrui, and Dong Cheng, deciding to act when Dong Zhuo entered the court.
In the fourth month of the third year of Chuping, Dong Zhuo returned to Chang'an from Meiwu, intending to abdicate the throne. Wang Yun forged an imperial edict, summoning Dong Zhuo to court to receive the abdication. Dong Zhuo gladly went. When he arrived before the Weiyang Palace, he saw banners blocking the sky within the palace gates and a forest of spears and swords. Dong Zhuo grew suspicious and wanted to retreat, but was blocked by Shi Sunrui and Dong Cheng. Lü Bu appeared with several hundred armored soldiers and shouted sternly, 'By imperial decree, I am here to punish the traitor!' Dong Zhuo was greatly shocked and urgently called out to Lü Bu to save him. Lü Bu said, 'There is an edict to punish the traitor. What has that to do with me?' He then thrust his halberd at Dong Zhuo. Dong Zhuo was mortally wounded and had his head cut off by Li Su. All the officials shouted, 'Long live the emperor!' Wang Yun ordered Dong Zhuo's head to be displayed publicly as a warning, his clan to be wiped out in three degrees of kinship, and Chang'an to be pacified.
When Dong Zhuo's generals Li Jue, Guo Si, Fan Chou, and Zhang Ji heard the news, they were all terrified and wanted to disperse. But Jia Xu advised them, 'If you all lay down your arms and return to your fields, even a single village chief could capture you. It would be better to gather troops and attack Chang'an, avenging Dong Zhuo. If you win, you can occupy the capital and command the realm; if you lose, it will be no later to die.' The generals followed his advice.
Li Jue and Guo Si assembled the Western Liang troops, their momentum greatly increased, and they advanced on Chang'an. Wang Yun, relying on Lü Bu's prowess, ignored Jia Xu's advice to 'pardon Dong Zhuo's former subordinates to pacify them', and instead drove Jia Xu away. All the officials were terrified; Lü Bu went into battle repeatedly but could not achieve victory. The morale of the troops in the city began to waver.