In late 206 BC, Liu Bang led his army out of Bashu to attack the Three Qins. This marked the beginning of a four-year-long power struggle for supremacy over China between Liu and Xiang Yu, which became known as the Chu–Han Contention. At that time, the Hán kingdom was ruled by Zheng Chang, who was appointed "King of Hán" by Xiang Yu. Liu Bang promised to help Hán Xin gain back his kingdom, and appointed him as a marshal before sending him to attack Zheng Chang. By the following year, Hán Xin conquered more than ten cities in the Han kingdom and forced Zheng Chang to surrender. Liu Bang granted Hán Xin the title of "Prince" or "King of Hán". In 204 BC, Liu Bang was defeated by Xiang Yu at the Battle of Xingyang and Hán Xin was captured by Xiang Yu in battle and temporarily surrendered. Hán Xin managed to escape and return to Liu Bang's side later. Hán Xin was reinstated as "Prince" or "King of Hán" and became a vassal of the Han Dynasty after Liu Bang defeated Xiang Yu in 202 BC and became Emperor of China. He was granted the lands around Yingchuan as his fief and built his capital at Yangzhai.
Flight to Xiongnu
In 201 BC, Emperor Gaozu felt that Hán Xin's fief was in a strategic location and was worried that Hán might pose a threat to him. Hence, under the pretext of sending him to defend the northern border, Gaozu had Hán Xin relocated to Taiyuan Commandery, with Jinyang as Han's capital. Hán Xin requested to have his capital at Mayi instead and Gaozu approved. Not long later, the Xiongnu attacked Mayi and Gaozu suspected Hán Xin of secretly conspiring with the Xiongnu against him. Gaozu sent an imperial edict to Hán Xin, reprimanding him. Hán Xin was afraid of being exterminated and formed an alliance with the Xiongnu against the Han Empire. In late 200 BC, Gaozu personally led an army to attack Hán Xin and forced him to retreat to Xiongnu territory. However, Gaozu lost to the Xiongnu at the Battle of Baideng and retreated. Hán Xin and the Xiongnu constantly raided the northern border in the following years.
Death
In 196 BC, Xin allied with the Xiongnu again to attack the Han Empire, and occupied the town of Canhe. Chai Wu, the Han general assigned to fend off the invasion, wrote a letter to Xin, asking him to surrender and return to Han, claiming that Emperor Gaozu was forgiving while Hán's betrayal was not serious. The former king refused, claiming he had committed three treasonous acts against Gaozu, while making reference of Fan Li, Wen Zhong and Wu Zixu to imply that Emperor Gaozu would not be as forgiving as Chai claimed. In the ensuing battle, Chai massacred the population of Canhe and killed Xin.
Descendants
Xin, King of Hán had at least two sons:
Crown Prince of Hán, who followed his father to Xiongnu and fathered Hán Ying.
Hán Tuidang, a younger son who was born in the city of Tuidang in Xiongnu.
Both Hán Tuidang and Hán Ying returned to Han during the reign of Emperor Wen. There were other more distant descendants of the King as follows:
Hán Lin, an official in early Eastern Han, was recorded as a descendant through Hán Tuidang.
Hán Ji, an official in late Eastern Han and Cao Wei, was said to be a descendant.