The Qin Dynasty (221-206BC), the first to unify China under one ruler, collapsed amid peasant revolts, civil war and natural disasters in 210BC after the death of its First Emperor (Qin Shihuang). Many factions emerged and warred with each other incessantly, devastating large parts of China: one led by Chen Sheng and Wu Kuang, Xiang Liang and Xiang Yu of Chu regime from Jiang Dong, one led by Ying Bu from Po Yang, and one by Peng Yue from Yu Je. Liu Bang managed to round up three thousand volunteer uprising troops in his hometown Pei County of Jiangsu Province. Later, Xiang Yu and Liu Bang became the most prominent among the risers.
In following years, Cheng Sheng, Wu Guang and Xiang Liang successively died in the fight, and Xiang Yu took over the armies in the north. Liu Bang moved his forces north and aligned himself with the Chu forces.
In 206BC, Liu Bang was the first to enter the capital city of Xian Yang and ended the rein of the Qin Dynasty. Liu Bang abandoned the harsh Qin laws, reduced taxes, and instituted three regulations to protect the common people; this made Liu Bang very popular with the people.
But because of his lack of soldiers, Liu Bang could not fight against Xiang Yu and was forced to withdraw his forces to Ba Shang, left behind his father and wife who were captured by Xiang Yu. After Xiang Yu proclaimed himself Prince of Western Chu (Xi Chu Ba Wang) and entitled eighteen warlords of Chu, he named Liu Bang Prince of Han (Han Wang).
Liu Bang was twice almost killed by Xiang Yu, and was able to flee both times only because Xiang Yu had not taken his consultant Fan Zeng's advice. One occasion was at the Hongmen Feast after Liu Bang first entered Xian Yang. At the Hongmen Feast, a trap was planned after Liu Bang had been forced to go to the Chu camps to make an apology. Fan Zeng and Xiang Yu had decided to kill Liu Bang during this meeting, and Fan Zeng signaled Xiang Yu to take action three times, but Xiang did not respond. As a result, Liu Bang fled. After the banquet, Fan Zeng was furious, saying, "This mean fellow (Xiang Yu) is not worthy of my service. It should be Peigong (Liu Bang) that defeats Xiang Yu and conquers the country."
During the Xian Yang Battle, Liu Bang's troops were besieged and ran out of ammunition and provisions, and as a stratagem to gain a respite, Liu sued for peace, to which Xiang Yu agreed, but Fan Zeng opposed strongly. At this time, Chen Ping, who was helping Liu Bang, used the stratagem of sowing distrust between Fan Zeng and Xiang Yu. As a result, Xiang Yu became suspicious of Fan Zeng and discharged him from his post, and Liu Bang thus avoided another disaster. Fan Zeng, at age 73, knowing that he was unable to save the situation, bid Xiang Yu farewell and left for his hometown, but died of disease on the way. After Fan Zeng's death, Xiang Yu had no more capable men left on his side, and a year later, the Chu came to an end.