Once upon a time, Emperor Gong, named Yang You, was the son of Crown Prince Yang Zhao from the Yuan De era. His mother was Consort Wei. This child was clever and astute from a young age, showing the qualities of a leader. In the third year of the Daye era, he was granted the title of King of Chen. A few years later, he was promoted to King of Dai, with a fief that included over ten thousand households. Later, when Emperor Yang of Sui personally led a campaign to Liaodong, he was left in the capital to handle state affairs. By the eleventh year of the Daye era, when Emperor Yang of Sui went to Jinyang, he appointed him as the Governor of Taiyuan. Soon after, he was recalled to the capital to defend it. Later, the rebel army invaded Chang'an and proclaimed Emperor Yang of Sui as the Grand Emperor, then endorsed Yang You to inherit the throne, thus becoming emperor.

Thus, Yang You ascended the throne without any major obstacles and began his imperial career. He inherited a dynasty that was shaky and faced significant challenges and a complicated situation. What happens next? We'll just have to wait and see.

On a certain day in November of the year 617, Li Yuan ascended the throne as emperor in the Taiji Hall. He issued an edict saying: “The country is in turmoil, and the world is unsettled; such situations have been occurring since ancient times. Now it is my turn to bear this heavy responsibility, which is truly overwhelming! I've faced hardships since I was a child; my father was forced to leave Chang'an when I was young. Although everyone urged me to ascend the throne, I felt very uneasy. Duke Tang (referring to Li Yuan, the Duke of Tang) assisted me, like a boat navigating through dangerous rapids. He recruited troops, supported the royal family, and shared the fate of the nation, rescuing the country from peril twice. He was ordered to assist me when I was still young; after I ascended the throne, he was by my side. I wanted to make him emperor, but he graciously declined. Although I was far away, he repeatedly refused, and in the end, he accepted my request and took on this responsibility. For the good of the country, I had no choice but to heed everyone's advice and follow the imperial decree to ascend the throne. Now I announce a general amnesty, renaming the era to Yining, the first year. Before dawn on the sixteenth of November, all criminals sentenced to death or lesser penalties will be pardoned, except for those whose crimes are too serious to be pardoned.”

On the same day, Li Yuan appointed the Duke of Tang, Li Yuan, as the acting Grand Duke with the yellow scepter, envoy with special authority, Grand Commander of all military affairs, Minister of the Ministry of Personnel, and Grand Chancellor, and promoted him to King of Tang. Two days later, Li Yuan issued another edict saying, "I left the palace at a young age, and my father went far away; at that time, the world was in chaos, and I had to take on this responsibility. After ascending the throne, it felt like crossing a vast river without knowing what to do, which made me very anxious. Being young, I don’t fully understand the people's circumstances. I know that governing the country is very difficult, but fortunately, there are many loyal ministers and good generals to assist me in handling state affairs. Regardless of the size of the matters, civil and military officials each perform their duties, with clear rewards and punishments, all managed by the Chancellor's office. I study historical examples and uphold traditional practices; my goal is fairness and justice, not to brag about my accomplishments." In the same month, Li Yuan enfeoffed his son, Li Jiancheng, as the Crown Prince of Tang, Li Yuanji as Duke of Qi, and Li Shentong as Duke of Qin, each granted land for ten thousand households, and established the Northern Command in Taiyuan. One day in December, an elder named Kang from Zhangye led a rebellion. In the same month, Xue Ju proclaimed himself emperor and launched an attack on Fufeng. Li Shentong acted as the commander-in-chief and successfully defeated Xue Ju. Later, a man named Cao Wuche from Guiyang rebelled and changed the era name to Tongsheng. Li Yuan's army captured the valiant general Qutu Tong and tens of thousands of his soldiers in Wanshang. Later, the bandit leader Zhang Shan'an took control of Lujiang County.

On the fourteenth day of the first month in the year 618 AD, the emperor issued an order allowing the Tang king to wear court robes and enter the palace by carriage for court, without the need to hurry like other ministers. He was exempt from bowing during court and was granted a retinue and band to accompany him. On the twenty-eighth of the same month, General Wang Shichong was defeated by Li Mi. The defending general of the Hanoi region, Meng Shanyi, along with generals Wang Bian, Yang Wei, Liu Changgong, Liang De, and Dong Zhitong, were killed in battle. On the fourth day of the third month, Dugu Wudu, the magistrate of Heyang, surrendered to Li Mi. On the twentieth of March, Right Guard General Yu Wenhua killed the retired emperor in Jiangdu Palace, and Right Imperial Guard General Dugu Sheng also died in this uprising. King Yang Rang of Qi, King Yang Gao of Zhao, King Yang Tan of Yan, along with numerous officials, including Grand Minister Yu Wenxie, Inner History Attendant Yu Shiji, Imperial Censor Pei Yun, and Secretary Xu Shanxin, became victims. Yu Wenhua then supported Qin King Yang Hao's ascension to the throne and became the Grand Chancellor, forcing all civil and military officials in the court to accept new positions.

Grand Minister Mai Cai and Zhe Chonglang General Shen Guang secretly planned to attack Yu Wenhua, launching a night raid on his camp, but were ultimately killed. On the twenty-eighth of March, the emperor issued an edict to prepare the nine-gift ritual for the Tang king, granting him a jade seal, ceremonial robes, a long-distance travel crown, and a green silk ribbon, elevating his status above that of other feudal lords. The Tang state also established positions such as the Grand Chancellor according to previous systems.

On the first day of the fifth month, the emperor issued an edict commanding the Tang king to wear the twelve-tassel crown (a crown only the emperor could wear), to use the emperor's banners, to travel in the emperor's carriage, equipped with various ceremonial vehicles, and even to have the eight-ritual dance music and drums that only the emperor could use. The titles and ranks of the Tang king's queen, princes, and princesses were also established according to previous protocols. On the fourth day of the fifth month, the emperor issued an edict stating: "The edict says:"

The Sui Dynasty faced natural disasters and man-made calamities, and the grand emperor was assassinated in Jiangdu, which left the situation critical and the responsibilities heavy. As a young and ignorant child, I unfortunately became embroiled in this disaster, devastated and physically and mentally drained. Suffering such torment yet powerless to seek revenge, I could only feel lonely and helpless, not knowing what to do. Fortunately, the Tang king rose to the occasion, responding to the mandate of heaven, rescuing the nation from peril, waging campaigns from north to south and east to west, unifying the country, quelling rebellions, protecting the people, and preserving me. His merits are comparable to that of the Creator, his achievements shaking heaven and earth, and the people returning to their hearts; this is the will of heaven. As a minister, I have gone against the will of heaven. I think back to the abdication of Yu Shun; without Shun, who could have succeeded Yu? Now the country is fragmented, the mandate of heaven is lost; I should yield to those more worthy and extend my kindness, but I am powerless to do so, only able to let my attendants drive me back to my fief. I was once a prince, but in my generation, the mandate of heaven has ended, and it has come to this! I aspire to follow the example of the ancient sage kings by punishing the four evils, to honor my filial duty. To redress the grievances of my royal ancestors and protect the ancestral temple sacrifices, even if I die tomorrow, I would have no regrets in the afterlife. Now, following ancient customs, I abdicate and return to my old residence. All officials must serve the Tang Dynasty and, according to previous customs, confer a noble title. In this way, I can finally lift this heavy burden from my shoulders, overwhelmed with gratitude, relying on the power of the Tang king to eliminate treachery. All ministers understand my intentions. I hereby decree that no memorials are to be presented to me. That day, I abdicated the throne in favor of the Tang king and was granted the title of Duke of Xing. I passed away in the summer of the second year of Wude, at the age of fifteen.

The historian said: Emperor Gong was still young, experiencing great changes in his family and country, the misconduct of one person led to chaos in the realm. Thieves ran rampant, like wolves on the prowl. While fleeing south, he never came back. He lived for 106 years and completed his life; though he sang songs and enjoyed music, he could not emulate Yao and Shun; what could he do? "Heaven's calamity struck the Sui dynasty, the great Emperor Tai Shang faced bandits in Jiangdu, who were exceedingly cruel and barbaric." "In the ancient times of Yu and Xia, people yielded and gave way to one another; if it weren't for the nation's significance, who could have appointed Yu?"