Cao Cao led his army to attack Wancheng, while Zhang Xiu, the ruler of Wancheng, was worried and afraid of Cao Cao's mighty army. Cao Cao invaded Jingzhou, upon reaching Wan, Zhang Xiu offered to surrender. His strategist Jia Xu suggested that he feigned surrender first and then later draw up a plan to defeat Cao Cao. As Jia Xu had predicted, Cao Cao accepted Zhang Xiu's surrender and allowed him to remain in control of Wancheng. Later, Cao Cao was attracted to Zhang Xiu's deceased uncle Zhang Ji's widow, and took her as a concubine. Zhang Xiu felt humiliated and longed to get back at Cao Cao. Cao Cao heard about Zhang Xiu's displeasure and plotted to kill Zhang. However, the plan was leaked out and Zhang Xiu revolted and launched an attack in the night on Cao Cao's camp.
Zhang Xiu's forces stormed Cao Cao’s camp. The battle went against Cao Cao, with no advantage, he fled on a light horse. Dian Wei battled at the gate preventing the traitors from entering. The troops then entered from the other gates. At the time Dian Wei had about ten or so men; they all fought a desperate battle; each fought like ten men. The traitors numbered many and were coming from front and rear. Dian Wei using his long crescent halberds attacked left and right destroying ten or more. The surrounding area littered with many casualties and dead. Dian Wei received over ten cuts, yet he continued to fight despite lacking troops. Dian Wei held onto two traitors underneath his arms, killing them. The remaining traitors dared not to advance any further. Dian Wei continued attacking the traitors, killing numerous men. His wounds took its toll, he let out a great cry and then died. The traitors dared not to advance and take his head, instead returned to the army. Cao Cao had retreated back to Wu Yin where he then heard about Dian Wei’s death. The news brought tears to his eyes. Cao Cao's son Cao Ang offered his steed to his father and bravely stayed behind to hold off the enemy, allowing his father to escape while he was killed in the battle. Cao Cao's beloved nephew Cao Anmin was also killed in battle.
This battle was one of the most humiliating moments in Cao Cao's life.
This battle appears in video games such as ''Dynasty Warriors'', where the stage is the highlight of Dian Wei's story. Chronologically, Dian Wei as an non-playable character makes his last appearance and doesn't appear anymore in the next stages.