Liu Bang is elected Duke of Pei

Because on the way to escort the prisoners, many of them escaped, and the others were looking for an opportunity to escape. Liu Bang did not want to be punished to death by the torture of the Qin dynasty for not successfully completing the task of escorting the prisoners to Mount Li to repair their tombs, plus Liu Bang thought: instead of sending these prisoners to repair the tombs for the tyrannical emperor, he would give these prisoners a chance to reform and go home to honour their parents and raise their wives and children. So, Liu Bang set the prisoners free - he gave them a chance to renounce evil and do good.

After releasing the prisoners who were supposed to be taken to Xianyang to repair the tomb of Qin Shi Huang, Liu Bang planned to find a place to settle down first and then bring his parents, wife and children to join him. But before he could meet his family, Liu Bang was pursued by the magistrate for failing to complete his task of escorting the prisoners, so Liu had to flee. What Liu Bang did not expect was that the officials could not catch Liu Bang, but they did catch his wife, Lu Pang. The laws of the Qin Dynasty were cruel and ruthless, but the poor wife, Lu Pang, was arrested and imprisoned because her own husband had failed to complete his work.

Faced with the situation at the time, Liu Bang was cornered: only by rising up and overthrowing the Qin Dynasty's brutal rule and torture could Liu Bang save his wife and those implicated by Liu Bang.

Liu Bang looked carefully at the situation.

In 209 BC, Chen Sheng and Wu Guang led a rebellion. As the people of Qin were so oppressed by the tyranny of the Qin Dynasty that they could not breathe, when these people met the leaders who wanted to overthrow the tyranny, the people immediately started to support the leaders as if they had found a saviour. Led by the rebel generals, the people responded to Chen Sheng by killing the local governors. They had successfully captured Chen County and Chen Sheng was crowned king with the name of Zhang Chu.

Meanwhile, the magistrate of Pei County was terrified at the news of the people's rebellion. After weighing the pros and cons, he decided to find someone to discuss how he could save his life and wealth? Xiao He and Cao Shen, the magistrate's men, told the magistrate, "You are an official of the state of Qin, and if you lead the people of Pei County against the state of Qin now, it doesn't seem right. Why don't you send someone to recruit back the prisoners who have fled from Pei County, it is estimated that there will be at least a hundred of them, all of them can be of use, with their support, the people will not dare to disobey your orders." The magistrate then sent Liu Bang's friend Fan Kuai to recruit Liu Bang back to the county. When Liu Bang's friend Fan Kuai told Liu Bang the news, Liu Bang was so happy that he immediately gathered those loyal men who were several hundred men under him and rushed to Pei County, but the magistrate suddenly changed his mind. He was afraid that Liu Bang and others would not listen to him, so he hurriedly ordered the city gates to be closed and had people arrest Xiao He and Cao Shen as soon as possible.

When Xiao He and Cao Shen got the news, they had to flee in a hurry. They both climbed out along the city walls and managed to join Liu Bang and his men. Liu Bang knew it well: he who wins the hearts of the people will win the world. So he sent a batch of letters written on cloth and silk and shot them into the city with arrows to let the people in the city know their situation and how to get rid of the tyranny of the Qin Dynasty. In his letter, Liu Bang wrote in sincere words: "Fathers and relatives, the people have suffered from the rule of the Qin Dynasty for a long time, although you are now defending the city for the county magistrate, but the people outside are rebelling more and more and their power is growing, and it will not be long before their power will reach Once they arrive, you will not be able to defend the city in any way, and if the city is breached, the whole city will be killed! For the sake of all our lives, the best way is to kill the magistrate who is defending the tyranny of the Qin Dynasty, and elect a leader who will benefit the people, so that this leader can lead us to respond to the calls and uprisings of other lords, so that all of our lives can be saved, otherwise, all our families may be killed, which is too bad.

When the people in the city saw Liu Bang's letter, they scrambled to pass it around. Everyone had heard about the situation outside the city, and the magistrate in the city was usually focused on enjoying glory and wealth and did not show much kindness and care to the people in the city, and the tyrannical rule of the Qin Dynasty had long made the people lose confidence and hope. In this way, Liu Bang succeeded in taking Pei County and the people of Pei County elected Liu Bang to be the magistrate of Pei County, but Liu Bang refused. Liu Bang knew that in the past he was just a small-time pavilion chief who was idle in the hearts of many people. In the past he was only interested in drinking and eating food, and he did not know how many people could truly support him according to his previous actions. So Liu Bang said to the people, "Now that the world is in chaos and the vassals have risen up in droves, it would be very dangerous if the leader is not chosen properly.

At that time, there were only two civil officials, Xiao He and Cao Shen, with the highest prestige in Pei County, who were inexperienced in raising an army to rebel.

The people, on the recommendation of Xiao He and Cao Shen, were even more convinced by Liu Bang, who, despite appearing to be a small-time ruffian, often caused trouble because he was righteous: when he saw injustice, he pulled out his sword to help! Over the years, we have heard many fabulous legends about Liu Bang, such as: Liu Bang is the reincarnation of the Purple Star! Liu Bang was the true son of the dragon, and so on, and all this added to the people's confidence in electing Liu Bang as their leader. Of course, the people did not want to play with their own lives, so some of them even took the opportunity to divine the fortune of Liu Bang, which was very auspicious.

So, no matter how much Liu Bang excused himself, everyone was sure of him, and so Liu Bang was elected by the people to become the Duke of Pei. Liu Bang led Xiao He, Cao Sen and Fan Kuai, plus the two to three thousand sons of Pei County who had been recruited from outside, and began a plan to attack other nearby counties. Liu Bang's position, army, territory and power as Duke of Pei were thus stabilized little by little.