Battle of Wan Castle

The Battle of Wan Castle occurred from 197 to 199 AD when Cao Cao's army laid siege to Wan Castle in Jing Province, the home of rival warlord Zhang Xiu. Zhang Xiu tricked Cao Cao into thinking that he was about to surrender, only to attempt to assassinate him at a banquet; Dian Wei foiled Zhang Xiu's assassination plot, sacrificing himself in the process. Cao Cao then returned to the castle with his general Xiahou Dun and captured it after an assault, accepting Zhang Xiu's submission and recruiting his strategist Jia Xu into his own army.

Background
In 197 AD, Dong Zhuo's former general Zhang Ji was mortally wounded by a stray arrow while attacking Liu Biao's granary at Nanyang, and his nephew Zhang Xiu assumed command of his army. Zhang Xiu joined Liu Biao and camped at Wan Castle, and the two of them intended to attack the capital of Xuchang and rescue Emperor Xian of Han from Cao Cao's captivity. Cao Cao decided to make peace with Lu Bu as he took 150,000 troops in three divisions to besiege Wan Castle and force Zhang Xiu to surrender.

Zhang Xiu's ambush
Cao Cao's army besieged Wan Castle, and Zhang Xiu's strategist Jia Xu advised him to surrender, as the situation was hopeless. Zhang Xiu decided to surrender, and Cao Cao was merry at Zhang Xiu's decision; he decided to seek out a singing girl to celebrate. His nephew Cao Anmin introduced him to Zou Ji, whose beauty was legendary; Cao Cao was infatuated with her and invited her to share the same pillow as him; they had a dalliance over the next several days, although Zou Ji warned Cao Cao that she was Zhang Xiu's aunt, and that Zhang Xiu might grow suspicious. Sure enough, Zhang Xiu was made aware of Zou Ji's prolonged absence, and he was humiliated by the allegations of a romantic affair between them. Zhang Xiu laid out plans to murder Cao Cao at a banquet, and his officer Hu Juer planned to get Cao Cao's bodyguard Dian Wei drunk in order to inhibit his abilities and give him the opportunity to steal his double halberds. This plan succeeded, and Hu Juer was able to steal the halberds from Dian Wei. As Cao Cao dined at the banquet, a fodder cart was reported to be burning, and Cao Cao initially shrugged it off as a soldier accidentally dropping a spark. However, the fire soon spread on all sides, and Cao Cao called Dian Wei, who was lying down while intoxicated. Dian Wei snatched an infantryman's sword and assisted Cao Cao as he escaped from the castle, and Dian Wei killed over 20 of Zhang Xiu's soldiers before he was stabbed in multiple parts by spears. He even survived several arrows before mutineers stabbed him in the back, and he died, having held off the enemy long enough for Cao Cao to gain the advantage in his escape. Cao Cao was then wounded in the arm with an arrow, Cao Anmin was hacked to pieces, and Cao Cao's own son Cao Ang was killed by several arrows. Cao Cao ultimately succeeded in escaping the castle, and he returned to his camp and rallied his men.

Fall of the castle
Cao Cao ordered Xiahou Dun, Xu Chu, Li Dian, Yue Jin, and Yu Jin to attack Zhang Xiu's pursuing forces, and Zhang Xiu's units outside of the castle walls were attacked. Cao Cao and Xiahou Dun then led their forces out of their base camp to attack Wan Castle from the south and east, easily pushing back Zhang Xiu's forces and advancing into the castle from the south. It was then that Jia Xu carried out a fire attack, eliminating Cao Hong's unit and forcing him to retreat. Liu Biao then arrived with his generals Huang Zu, Kuai Yue, Kuai Liang, and Deng Ji, moving on Cao Cao's main camp; they were joined by Zhang Xiu's generals Zuo Ling and Yang Ding. Cao Cao rushed to the aid of his main camp, which was protected by Cao Ren and Xiahou Yuan, and he routed Liu Biao's forces from the battlefield. Xiahou Dun then dispatched Guo Jia and Li Dian to the castle's western bridge for a ploy designed to draw out and defeat Zhang Xiu's forces. Jia Xu advanced out of the castle to confront the advancing enemy, only for Cao Cao to cut him down and wound him. Cao Cao held Jia Xu at the tip of his sword before deciding not to kill him, deciding that he could use his talents; however, he warned him that he would show him no mercy, and that he would kill him if he became useless.

Aftermath
Zhang Xiu fled to Liu Biao's lands after his defeat, and, in 199 AD, he decided to surrender to Cao Cao rather than ally against him with Yuan Shao. Cao Cao recommended that Emperor Xian ennoble Zhang Xiu as a marquis, and Zhang Xiu went on to serve Cao Cao at the Battle of Guandu in 200 AD.