Li Bai’s experience in the Anshi Rebellion:
In the fourteenth year of Tianbao (755 AD), the Anshi Rebellion broke out, and Li Bai and his wife Zong fled south to seek refuge. Spring is in Dangtu. When he heard that Luoyang had fallen and the Central Plains collapsed, he returned to Xuancheng from Dangtu and took refuge in Kezhong (today's Knee County, Zhejiang Province). When he arrived in Piaoyang (now Luanyang County, Jiangsu Province), he met Zhang Xu. The summer solstice is in Yuezhong. After hearing that Guo Ziyi and Li Guangbi had a great victory in Hebei, they returned to Jinling. In the autumn, I heard that Xuanzong was on his way to Shu, so he went west along the Yangtze River and lived in seclusion at Pingfengdian in Lushan Mountain.
In the first month of the fifteenth year of Tianbao and the first year of Deyuan (756 years), An Lushan proclaimed himself Emperor of Dayan in Luoyang. In May, Guo Ziyi and Li Guangbi defeated Shi Siming and regained more than ten counties in Hebei. In June, An Lushan led his troops to attack Tongguan and captured Ge Shuhan alive.
In the second year of Zhide (757), Li Bai was fifty-seven years old. In the first month of the first lunar month, in the Yongwang military camp, he composed a poem "Yongwang's Eastern Patrol Song" to express his feelings of serving the country through meritorious service. King Yong led his troops to patrol eastward without permission, which led to a conquest and defeat. Li Bai was imprisoned in Xunyang. Rescued by Song Ruosi and Cui Huan. After becoming Song Ruosi's staff, he wrote some essays for Song and followed him to Wuchang.
Li Bai was highly regarded by Song Ruosi and recommended him to the court again in the name of Song, hoping to be appointed by the court again. Finally, he was sentenced to Changliu Yelang (today's Tongzi, Guizhou) for participating in King Yong's eastward patrol. In April of that year, when Du Fu was forty-six years old, he escaped from the bandit camp and paid a visit to Su Zong in Fengxiang, where he was granted the right to collect his treasures.
In April of the first year of Qianyuan (758), Shi Siming rebelled. In May, Suzong dismissed Zhang Hao as prime minister and became the governor-general of Jingzhou. In December, Shi Siming fell into Weizhou (now southern Hebei Province). Li Bai was fifty-eight years old. Li Bai set out from Xunyang and began to live in Yelang for a long time. His wife and brother Zong Sui saw each other off. Late spring and early summer. Passed by Xisaiyi (today's east of Wuchang County) to Jiangxia, visited Li Yong's former residence, climbed the Yellow Crane Tower, and looked at Parrot Island. Arrive at Jiangling in autumn and enter the Three Gorges in winter. That year, Du Fu was forty-seven years old and joined the army for Huazhou Sigong. Extended information
During the prosperous Tang Dynasty, national power was strong, and most scholars were eager to make contributions. Li Bai regarded himself as an unparalleled talent and promised to "exercise his wisdom and be willing to serve as an assistant to make the whole region settled and Hai County unified". He devoted his life to the pursuit of "Talking about Smiling An Liyuan" and "Li Yuan". The ideal of finally settling the country down. He compares himself with the big roc, the celestial horse, and the majestic sword: "The big roc rises with the wind in one day and soars ninety thousand miles. If the wind stops and comes down, it can still win the water." ("Li Yong").
He hopes to be like Jiang Shang in assisting Mingjun, and like Zhuge Liang in reviving the Han Dynasty. "Liang Fu Yin", "Reading the Biography of Zhuge Wuhou", "Yong Wang's Eastern Patrol Song" and "The Journey Is Difficult" (Part 2) all reflect his thoughts of this kind.
Reference: Baidu Encyclopedia--Li Bai