|Chancellor of Pei (沛相)|
? – ?
|Monarch||Emperor Xian of Han|
|Chancellor of Jibei (濟北相)|
? – ?
|Prefect of Ju (劇令)|
? – ?
Lianshui County, Jiangsu
|Courtesy name||Hanyu (漢瑜)|
Chen Gui's ancestral home (and probably birthplace too) was in Huaipu County (淮浦縣), Xiapi Commandery (下邳郡), Xu Province (徐州), which is present-day Lianshui County, Jiangsu. He came from a family of government officials. His uncle, Chen Qiu (陳球), held high-ranking positions in the Han government during the reign of Emperor Ling. Chen Qiu's sons, Chen Yu (陳瑀) and Chen Cong (陳琮), served as commandery administrators.
Chen Gui started his career as the Prefect (令) of Ju County (劇縣; south of present-day Shouguang, Shandong) in Beihai State after he was nominated as a xiaolian (civil service candidate) by his home commandery. He resigned after some time, but was later nominated as a maocai (茂才; outstanding civil servant) and appointed as the Chancellor (相) of Jibei Kingdom (around present-day Tai'an, Shandong). He was subsequently reassigned to be the Chancellor of Pei Kingdom (around present-day Pei County, Jiangsu).
Chen Gui was an old acquaintance of the warlord Yuan Shu, who, like him, also came from a family of government officials. In early 197, Yuan Shu declared himself emperor in Shouchun (壽春; present-day Shou County, Anhui) – an act deemed treasonous against the figurehead Emperor Xian of the Eastern Han dynasty.  Yuan Shu then wrote to Chen Gui: "In the past, when the Qin dynasty was overthrown, all the heroes throughout the Empire started fighting for power. In the end, only the smartest and bravest succeeded in seizing the Mandate of Heaven. As of now, the Han Empire is in a state of chaos and is on the verge of collapse. This is a time for heroes to make glorious achievements. We have known each other for years. Are you not willing to help me? If you are willing to join me, you will be my most trusted adviser."
At the time, Chen Gui's second son, Chen Ying (陳應), was in Xiapi (下邳; present-day Pizhou, Jiangsu), the capital of Xu Province. Yuan Shu wanted to send his men to seize Chen Ying, and use Chen Ying as a hostage to force Chen Gui to join him. Chen Gui wrote a reply to Yuan Shu:
"In the past, the Qin dynasty collapsed because it ruled in an oppressive, harsh and tyrannical manner, which forced the people to rise up and overthrow it. As of now, the Han dynasty may have declined, but the Han Empire is nothing like the Qin Empire in its final years. In the imperial court, General Cao uses his courage and wisdom to support the Emperor and restore order and stability to a central government rendered dysfunctional by corrupt officials. It will not be long before he eliminates all the Han Empire's enemies and brings peace to the people. I had expected you to work together with others to revive the Han dynasty, yet you decided to commit treason instead and bring disaster upon yourself. It hurts me to see you do this! If you can repent and turn back, you probably still have time to make up for your mistakes. I am only telling you this on account of our past relationship. You may not enjoy hearing this from me, but this comes from the very bottom of my heart. As for you asking me to consider my personal interests and join you, I only have to say that I would rather die than join you."
In 196, the warlord Lü Bu seized control of Xu Province from Liu 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 (左將軍),[a] 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 and wrote a letter to Han Xian and Yang Feng, urging them to defect to his side as well as promising to share the spoils of war with them. Han Xian and Yang Feng were so pleased that they sided with Lü Bu, defeated Zhang Xun at Xiapi (下邳; present-day Pizhou, Jiangsu) and captured Qiao Rui (橋蕤), one of Yuan Shu's officers. Yuan Shu's forces suffered heavy casualties and many of his soldiers fell into the river and drowned.