Dian Wei served Cao Cao since Zhang Jiao's Yellow Turban rebellion against the Han Dynasty. He was a close friend with Cao Cao and Xu Chu at the time. When Cao Cao saw Dian Wei's warrior skills in battle, he appointed him to be his personal bodyguard. At first, Dian Wei was reluctant to be Cao Cao's bodyguard, believing he was inadequate for the job, but accepted the position after Cao Cao had talked him into it.
Dian Wei met his end when Zhang Xiu attacked Wan Castle. Dian Wei fought gallantly on the battlefield, holding back Zhang Xiu's entire army, in an effort to allow Cao Cao to escape. Dian Wei was killed as a result, but Cao Cao did manage to escape thanks to Dian Wei.
The battle had also claimed the lives of other officers as well, including Cao Cao's own son Cao Ang. It was reported that Cao Cao said after the battle, "Losing Cao Ang was bad enough, but losing Dian Wei was even worse."