For at least one hundred days, the two were at a stalemate with Cao Cao’s army at the unfavorable end. Lü Bu had to give up his position because of a famine outbreak. To rebel against Cao Cao, Zhang Miao and Chen Gong handed Yanzhou over to Lü Bu. After hearing of the rebellion, Cao Cao laid siege to Lü Bu at Juye in Puyang Castle. Xun Yu and Cheng Yu defended the cities of Juancheng, Fan and Dong’a, but this left only two counties with solid defenses, so Cao Cao therefore led his army back. Lü Bu arrived, couldn’t take Juancheng by siege so he went west and garrisoned Puyang. Lü Bu re-stationed his forces to the east at Shanyang.
In battle, Lü Bu used his cavalry in the first clash of arms, charging against the Qingzhou Army. The Qingzhou Army fled in terror and the formations of Cao Cao were in complete disarray, and Cao Cao, seeing the confusion, quickly galloped ahead when a fire broke out, and he fell from his horse, burning the palm of his left hand. Before reaching the camp, the army halted. Most generals had not sighted Cao Cao and were fearful of his safety. Cao Cao then strained himself to rouse his officers, ordering that siege weapons be prepared immediately so that Lü Bu could be besieged once again. Zhang Miao followed Lü Bu and left Zhang Chao to settle the family at Yongqiu. Cao Cao took several months to siege the place and upon success killed Zhang Chao and his entire family. Zhang Miao then pleaded for assistance from Yuan Shu but was rejected and killed by his soldiers. At that time, there was a locust plague and the commoners were extremely hungry and the civilians had no choice but to resort to cannibalism or starve. Lü Bu had also used up all his provisions, horse feed, and grain supplies so both sides were forced to withdraw.
Cao Cao had surrounded Puyang, wherein the distinguished Tian family switched sides, Cao Cao thereby obtaining entrance to the city. He set fire to the eastern gate, demonstrating he had no intention of reversing course. Thereupon he came under attack and his army was defeated. Some of Lü Bu’s cavalrymen had captured Cao Cao but were not aware it was he. Lü Bu’s cavalrymen thereupon released Cao Cao and chased after the man on the yellow horse. The gate fire was now blazing but Cao Cao quickly dashed through and escaped.
Within two years’ time, Cao Cao was able to recapture all the cities and defeated Lü Bu at Juye. Lü Bu then fled eastwards to Liu Bei. This battle led to the Battle of Xiapi.
In ''Romance of the Three Kingdoms''
Cao Cao defeated
Zang Ba, Yue Jin, Xiahou Dun, and Zhang Liao fought. Lü Bu grew angry, and set out his Trident Spear and rushed towards them. Xiahou Dun and Yue Jin fled; however, Lü Bu kept pressing the attack and Cao Cao was forced to retreat ten miles and made a new camp.
Lü Bu sent Gao Shun, Wei Xu and Hou Cheng to defend the camp. Cao Cao attacked the camp from all four directions and the defending force was losing heavily. Cao Cao marched into the city and met with Commander Gao Shun. After the fourth watch, as dawn was breaking, Cao Cao heard war drums approaching quickly from the west. When he heard Lü Bu himself was leading the relief force, Cao Cao abandoned the attack.
Gao Shun, Wei Xu and Hou Cheng pursued him, with Lü Bu joining them in the lead. Cao Cao sent Yu Jin and Yue Jin to stop the pursuit, but they were unsuccessful. So Cao Cao went north, only to meet the ambush of Zhang Liao and Zhang Ba. Lu Qian and Cao Hong were sent to meet them, but they were also defeated. Cao Cao sought safety in the west, but again was met by Lü Bu’s forces, this time led by Hou Meng, Cao Xing, Cheng Lian and Song Xian. Cao Cao was in grave danger and cried out for help. Dian Wei came out to help on his own. Cao Cao was able to get away and make up camp.
Cao Cao whipped up his steed and entered the city. Soon, Cao Cao realized that he walked into a trap. An explosion of signal bomb was heard, gong beat all around with a roar. Cheng Gong set a trap for Cao Cao, and Cao Cao fell for it, the evasion routes were cut off. From the east and west, bodies of soldiers eagerly attacked; they were led by Zhang Liao and Zhang Ba. Cao Cao dashed out to the north; however, Cao Xing and Hou Meng barred him. Therefore, Cao Cao turned around towards the south, but was met by Gao Sheng and Hou Cheng. Dian Wei, Li Dian, and Li Yue rode through the masses of enemy soldiers in an attempt to find their lord. When Cao Cao met up with Dian Wei, he once again made a dash at the north gate, Lü Bu stood in the opening calling out for Cao Cao. However, Lü Bu was fooled easily and chased the wrong rider, giving Cao Cao a chance to escape with Dian Wei and Xiahou Yuan as his escorts.
Lü Bu defeated
The next day, word reached Lü Bu’s camp that Cao Cao burned to death in a fire during the fifth watch. Lü Bu immediately gathered his soldiers and took Ma Ling road to attack the enemy camp. Once he passed the hills, war drums could be heard from both sides and Cao Cao’s soldiers charged their enemy. Only by desperate fighting, did Lü Bu get out of the melee and back to Puyang. There he fortified his defenses and couldn't be tempted to do battle.
The next time Cao Cao’s army came to attack, he had six generals leading the battle: Xiahou Dun, Xiahou Yuan, Li Dian, Lu Qian, and Yu Jin. Lü Bu came out alone to oppose them, but soon his enemies overwhelmed him and he turned back towards the city. However, the Tian family had closed the gates and wouldn't let him in. Lü Bu was forced to flee and Chen Gong took Lü Bu’s family and fled the city through the east gate. Puyang was back in Cao Cao’s hands.
Lü Bu took refuge in Dingtao with Zhang Miao and Zhang Chao. Lü Bu went out to scout the enemy camp, but returned when he saw that Cao Cao’s camp was located near a forest, fearing an ambush he retreated to Dingtao.
Lü Bu decided to burn out the ambush with fire; he rode out again towards the camp and ordered his men to set fire to the woods. However, to his surprise, nobody leaped out from the woods. Still he heard the drums of his enemies, and he saw soldiers coming from the shelter in the stockade, he immediately rode forth to see what it was about. The signal bombs exploded and soldiers came out to attack Lü Bu. Xiahou Dun, Xiahou Yuan, Dian Wei, Xu Zhu, Li Dian, and Yue Jin led the troops. Lü Bu suffered a huge defeat, and almost two thirds of his troops were killed. His officer Cheng Lian died when an arrow hit him. The remains of the forces went back and reported this to Chen Gong. Therefore, Gao Shun and Chen Gong gathered the generals and abandoned Dingtao. Zhang Chao committed suicide and Zhang Miao fled to Yuan Shu. Lü Bu rejoined his generals later on. The northeast had completely fallen to Cao Cao.
Lü Bu’s spirit wasn't broken, and on Chen Gong’s advice, he inquired about serving Yuan Shao once again. In response, Yuan Shao sent Yan Liang with fifty thousand troops to destroy Lü Bu. Having no means of repelling such an army, Lü Bu fled to Xuzhou where he joined up with Liu Bei. Liu Bei welcomed Lü Bu with a large following.
In ''Dynasty Warriors 5: Xtreme Legends'' there is a stage dedicated to this battle.