Bei while the latter was away at a battle against Yuan Shu. Chen Gui and his eldest son, Chen Deng, were forced to become Lü Bu's subordinates. In 197, after declaring himself emperor, Yuan Shu proposed forming an alliance with Lü Bu, and offered to arrange a marriage between his son and Lü Bu's daughter. Chen Gui was worried that the two warlords would pose a greater threat to the Han central government if they became allies, so he advised Lü Bu to avoid having any ties to Yuan Shu. He also urged Lü Bu to build friendly relations with Cao Cao, the warlord who controlled the figurehead Emperor Xian and the Han central government in the imperial capital Xu (許; present-day Xuchang, Henan). Lü Bu heeded Chen Gui's advice and rejected Yuan Shu's offer. He also arrested Yuan Shu's messenger, Han Yin (), and sent him as a prisoner to the imperial capital Xu, where Han Yin was publicly executed. After that, Chen Gui asked Lü Bu to send Chen Deng as his representative to meet Cao Cao, but Lü Bu refused. However, after the Han central government sent an emissary to grant Lü Bu the appointment of General of the Left (), Lü Bu was so happy that he sent Chen Deng as his representative to Xu to thank Cao Cao and the Han imperial court. In Xu, Chen Deng urged Cao Cao to eliminate Lü Bu and agreed to serve as a mole for Cao Cao in Xu Province. Cao Cao also promoted Chen Deng to the position of Administrator () of Guangling Commandery (廣陵郡; around present-day Huai'an, Jiangsu), and increased Chen Gui's salary by 2,000 dan of grain. Yuan Shu was furious that Lü Bu reneged on his word, so he allied with Han Xian and Yang Feng, and sent his general Zhang Xun () to attack Lü Bu. Lü Bu asked Chen Gui, "Yuan Shu sends his forces to attack me because I followed your suggestion. What should I do now?" Chen Gui replied, "The alliance between Han Xian, Yang Feng and Yuan Shu is formed by a loose assembly of their forces. They have not decided on a common plan so they will not last long. They are like chickens tied up together and they cannot move in tandem. My son, Deng, has a plan to separate them." Lü Bu heeded Chen Gui's advice