After being enfeoffed and returning to his hometown, King of Chu Han Xin gave a large sum of money to the old woman who had once fed him by the river, appointed the butcher who had made him endure the humiliation of crawling between his legs as a commandant, calling him a brave man, and gave only a small amount of money to the village chief who had once hosted him, rebuking him as a man of weak will.
Among Xiang Yu's generals was one named Zhongli Mei, who was a close friend of Han Xin. After Xiang Yu was defeated and killed himself, Zhongli Mei learned that Han Xin had been made a king in the Chu region. To escape Liu Bang's pursuit, he fled to Chu to seek refuge with Han Xin. Someone informed Liu Bang of Zhongli Mei's whereabouts. Upon hearing that his valued minister was staying with an enemy general, Liu Bang flew into a rage and immediately ordered others to capture Zhongli Mei.
It happened that Han Xin was conducting large-scale military drills in the Chu region, leading troops wherever he went, which led many to say that Han Xin showed signs of rebellion. These words struck a chord with Liu Bang, and when Han Xin heard the rumors, he wanted to explain himself to Emperor Gaozu but feared that any explanation would only make things worse, leaving him unsure of what to do. Liu Bang asked Chen Ping for a plan, and Chen Ping suggested that the emperor pretend to tour the Yunmeng Marsh, summoning all officials to pay homage, forcing Han Xin to come whether he wanted to or not, at which point they could arrest and interrogate him.
Han Xin realized that the audience was merely an excuse for Liu Bang, and that he would certainly be arrested. He went to discuss countermeasures with Zhongli Mo, who said contemptuously, "It seems I cannot escape death, but do not think you can avoid disaster either. Liu Bang will eventually kill you." With that, Zhongli Mo drew his sword and committed suicide. Han Xin cut off his head and presented it to Liu Bang to show his loyalty. Unexpectedly, as soon as he met Liu Bang, he was bound by the guards with ropes. Han Xin said to Liu Bang, "It seems what others said is true: 'When the cunning hare is killed, the good hound is boiled; when the soaring birds are gone, the fine bow is put away; when the enemy state is destroyed, the wise counselor perishes.' Now that you have gained the empire, I have lost my value and become a threat." Liu Bang blushed deeply at these words but did not release Han Xin. Instead, he took him back to Luoyang, demoted him to the Marquis of Huaiyin, and placed him under house arrest.
During the period of house arrest, Han Xin and Zhang Liang together compiled military texts from the Qin Dynasty to the present, totaling one hundred and eighty-two volumes, marking the first large-scale compilation of military writings in Chinese history. They also made some additions and adjustments to military discipline, and Han Xin wrote three treatises on the art of warfare, which have since been lost.
Han Xin knew that Liu Bang feared his strategic mind the most, so from then on he stopped involving himself in state affairs, neither attending court nor accompanying the Emperor on outings, spending each day at home sighing in despair. He felt deeply aggrieved at being demoted to Marquis of Huaiyin, believing that after giving his all in the campaign against Xiang Yu, it was now utterly unfair to be placed on equal footing with Zhou Bo and Guan Ying. One day, Han Xin visited Fan Kuai's residence; Fan Kuai was so overjoyed that he ran out the gate and knelt on the ground to welcome him, yet Han Xin not only showed no gratitude but inwardly mocked himself for having sunk so low as to associate with Fan Kuai.

Marquis Chen Xi was appointed by Liu Bang as the governor of Julu Commandery, and before departing, he came to visit Han Xin. Han Xin quietly asked Chen Xi if he was willing to follow him, and Chen Xi swore loyalty to Han Xin. Han Xin then revealed his plan to rebel, saying, "The troops of Julu Commandery are the finest in the Han Dynasty, and you are a talent highly valued by the High Ancestor. If you were to rebel, the High Ancestor would not believe it at first, but by the time he does, your power will have grown. Then, with our combined forces, we can surely overthrow the Han Dynasty." Chen Xi had always trusted Han Xin's strategies without doubt, and he promised Han Xin that once his power was strong enough, he would certainly raise an army to rebel.
In 197 BC, the tenth year of Emperor Gaozu of Han's reign, news of Chen Xi's rebellion reached the Han palace. Liu Bang decided to personally lead the suppression and intended to have Han Xin accompany him on the campaign, but Han Xin declined, citing illness, and Liu Bang did not insist. After Liu Bang led the troops out of the city, Han Xin discussed with his retainers at his residence how to storm the palace, but one retainer leaked the plan; Han Xin quickly captured him and locked him up in the mansion. The retainer's brother went to Han Xin's residence to demand his release, but was intimidated by Han Xin, so he reported Han Xin's conspiracy to Empress Lü. Empress Lü immediately realized the gravity of the situation, but without evidence, she could not touch Han Xin, so she sought help from Chancellor Xiao He. Xiao He said, "Let me go tell him that Chen Xi has been killed, and then bring him to court." Empress Lü quickly had soldiers ambushed in the palace, and when Han Xin arrived, the troops seized him and brought him before her. Han Xin tried to plead with Xiao He for mercy, but there was no trace of Xiao He to be found. This is the origin of the saying, "Success due to Xiao He, failure also due to Xiao He."
Empress Lü ordered that Han Xin be killed in the bell chamber of Changle Palace, and she also wanted to exterminate his entire clan—his father's family, mother's family, and wife's family. For a time, Chang'an was swept by a bloody storm, with wails of grief heard everywhere.