In 198, during the Battle of Xiapi, fought between the warlords Lü Bu and Cao Cao (with support from Liu Bei), Cao's forces besieged Lü Bu in Xiapi (下邳; present-day Pizhou, Jiangsu) and directed the waters of the Yi (沂) and Si rivers to flood the city. After three months, the morale of Lü Bu's army fell drastically and his men gradually alienated him.
Around this time, Hou Cheng sent a trader to purchase 15 horses, but the man escaped with the horses and headed towards Xiaopei (小沛; present-day Pei County, Jiangsu) with the intention of defecting to Liu Bei. Hou Cheng personally pursued the trader and retrieved all the horses. Lü Bu's officers then threw a feast to celebrate Hou Cheng's achievement. Hou Cheng prepared 5-6 hu (斛) of wine and about ten roasted hogs, and he presented half a hog and five dou (斗) of wine to Lü Bu before the feast started. He knelt down and said, "With your grace, I managed to retrieve the stolen horses. The others came to congratulate me, so I prepared some wine and hogs for a feast. I don't dare to start first, so now I present the food and wine to you." Lü Bu was furious and he said, "I banned alcohol, but you and the others dare to throw a party! Are you plotting with them to kill me?" Hou Cheng was shocked and he immediately left. He also discarded the wine he prepared and returned the gifts he received from the other officers. On 7 February 199,[a] Hou Cheng, along with his colleagues Song Xian (宋憲) and Wei Xu (魏續), captured Lü Bu's strategist Chen Gong and general Gao Shun, and led their troops to surrender to Cao Cao.
This incident was dramatised in Chapter 19 of the 14th-century historical novel Romance of the Three Kingdoms. When Hou Cheng presented wine to Lü Bu, the latter was angry because Hou defied his ban on alcohol. Lü Bu ordered Hou Cheng to be executed, but Song Xian (宋憲) and Wei Xu (魏續) pleaded with their lord to spare Hou Cheng. Lü Bu then had Hou Cheng flogged 50 times before releasing him. Hou Cheng later plotted with Song Xian and Wei Xu to betray Lü Bu, so he stole Lü Bu's horse, the Red Hare, escaped from Xiapi, and went to Cao Cao's camp, where he told Cao Cao about their plot. With the aid of Song Xian and Wei Xu, Cao Cao's forces broke into Xiapi and captured Lü Bu.