Liu Xiu establishes the Eastern Han Dynasty

After the Battle of Kunyang, Wang Mang held a grand weeping ceremony in the southern suburbs of Chang'an, but soon the Green Forest Army began attacking the city. Wang Mang fled in panic with over a thousand followers to Jian Terrace. Wang Yi, who had previously confronted the Green Forest Army at Kunyang, did not flee with Wang Mang; instead, he led his troops to defend the city walls, resisting wave after wave of attacks. However, under the fierce assault of the Green Forest Army, Wang Mang's soldiers gradually faltered and were nearly all killed. Seeing this, Wang Yi had no choice but to lead his remaining troops to Jian Terrace to join Wang Mang and the others. There, Wang Mang and his followers lived in fear, unable to devise any effective plan to alleviate the crisis. To save themselves, some began to consider seeking their own escape routes. Wang Yi's son and the attendant Wang Mu secretly discussed fleeing. Just as they removed their official robes, Wang Yi spotted them. He harshly scolded the two, then ordered his son to put his clothes back on and brought him to Wang Mang's side, guarding him closely without leaving his side.

The Lülin Army, having captured Chang'an, learned that Wang Mang and some nobles and ministers were hiding at Jian Tai, so they rushed there without delay. Upon arriving at Jian Tai, the Lülin Army pursued and killed Wang Mang's followers everywhere, until over a thousand people were all slain, and Wang Mang, along with Wang Yi and his son who were protecting him, were also killed. Thus, the Xin Dynasty established by Wang Mang came to an end.

Although the Xin Dynasty no longer existed, the various commanderies and counties in Hebei did not actively submit to Emperor Gengshi, Liu Xuan. At that time, there were many self-established regimes across the country: the Red Eyebrows Army in Shandong was growing larger and larger, while local separatist forces in Hebei included Tongma, Youlai, Wei Xiao, and Gongsun Shu, making Liu Xuan's position far from unshakable. Therefore, Liu Xuan planned to send someone to Hebei to offer amnesty and persuade these various forces to submit to him. But who should he send? After much deliberation, Liu Xuan thought of Liu Xiu. Although Liu Xiu's elder brother, Liu Yan, had attempted rebellion, Liu Xiu had neither joined forces with his brother nor shown any resentment after his brother's death. Liu Xiu's abilities were evident to all, and only he could succeed in pacifying Hebei. However, Grand Marshal Zhu Wei and Li Yi strongly opposed this, arguing that Liu Xiu's capabilities already surpassed those of other generals in the Lulin Army, and if he were allowed to achieve further merits, he would eventually rebel like his brother Liu Yan. Hearing this, Liu Xuan hesitated—Zhu Wei and Li Yi's words made sense, but if not Liu Xiu, who else could handle the task of pacifying Hebei? Rebellion was certainly a serious matter, but allowing local forces to develop unchecked was also dangerous. Liu Xiu knew what Liu Xuan was thinking. To secure the mission to Hebei, he went out of his way to curry favor with the Left Chancellor Cao Jing, who then spoke well of him before Liu Xuan, while Liu Xiu himself solemnly swore eternal loyalty to Emperor Gengshi. Moved by Liu Xiu's apparent loyalty, in October of 23 AD, Liu Xuan appointed Liu Xiu as General Who Breaks the Enemy and concurrently Grand Marshal, sending him to Hebei to win over local forces.

To prevent Liu Xiu from betraying him, Liu Xuan did not provide him with troops or supplies, sending him to Hebei with only a simple carriage. However, Liu Xuan would soon realize that sending Liu Xiu to Hebei was a mistake, like releasing a tiger back into the mountains, bringing endless trouble upon himself.

After arriving in Hebei, Liu Xiu met his close friend Deng Yu, who urged him to declare himself king and predicted that the Gengshi regime would not last long. In truth, Liu Xiu had already been considering establishing his own rule, and now that even his friend advised him to break away from the Gengshi regime, his conviction grew stronger. However, not long after, the formidable power of local forces in Hebei left Liu Xiu anxious and uncertain about what to do. The Gengshi Emperor had not assigned him a single soldier, making it impossible for him to negotiate with local powers that held strong armies, let alone suppress them. Desperate, Liu Xiu considered fleeing back to Chang'an, but thanks to the support of Shanggu Commandery and Yuyang Commandery, he managed to capture Handan, recruit soldiers, gather surrendered troops, and ultimately carve out a foothold in Hebei.

Liu Xuan was still unaware that Liu Xiu's power had greatly expanded, and he continued to indulge in a life of pleasure and debauchery. He moved the capital from Luoyang back to Chang'an, then extensively appointed his own trusted followers in the court, granted titles and rewards to his family members, killed many leaders of the Green Woodsmen Army, and executed all ministers who advised or opposed him. Liu Xuan spent his days immersed in music and dancing, allowing his queen's father, Zhao Meng, to control state affairs. The common people and officials secretly called Liu Xuan the "Second Qin Emperor." Many ambitious individuals refused to serve Liu Xuan; some retreated to live as hermits in remote mountains and forests, others joined the Red Eyebrows Army, and still others defected to Liu Xiu.

In 24 AD, the leader of the Red Eyebrow Army installed the fifteen-year-old Liu Penzi as emperor in Hongnong (present-day Lingbao, Henan) and led forces north to attack Chang'an, catching the Gengshi Emperor Liu Xuan off guard and forcing him to hastily order his troops to counterattack. At this time, Liu Xiu also openly opposed the Gengshi regime in Hebei. Trapped between enemies with no way out, Liu Xuan surrendered to the Red Eyebrow Army in September 25 AD and was soon executed on the orders of their generals.

The Red Eyebrow Army captured Chang'an, but their acts of burning, killing, and looting made the common people despise them, and the wealthy landowners and powerful clans refused to interact with them. Unable to win popular support, the Red Eyebrow Army had no choice but to retreat back to Shandong. Liu Xiu seized the opportunity to set up an ambush along their route, and after several clashes, the Red Eyebrow Army was completely annihilated, bringing an end to the decade-long Green Forest and Red Eyebrow Uprising.

In June of the year 25 AD, Liu Xiu held his coronation ceremony at Hao County (present-day Baixiang, Hebei), reestablished the Han dynasty regime, and set the capital at Luoyang, which history records as the Eastern Han dynasty, with Liu Xiu becoming Emperor Guangwu of Han.

After the establishment of the Eastern Han Dynasty, Liu Xiu mobilized a large army to suppress the remaining separatist forces, finally achieving the unification of the empire in 36 AD. During his reign, Emperor Guangwu of Han, Liu Xiu, placed great emphasis on allowing the people to rest and recuperate, issuing a series of policies beneficial to the state and its citizens. Toward the Xiongnu and other ethnic minorities, he adopted a strategy of both kindness and coercion. Under his rule, the social economy recovered and developed, the living standards of the people improved, and the border regions were spared the suffering of war. Subsequent emperors followed his governing policies, and after decades of growth and strengthening, the Eastern Han reached its peak, a period historically known as the "Restoration of Guangwu."