Tang Xuanzong was the longest-reigning emperor of the Tang Dynasty, during which he created the most prosperous era of the Tang Dynasty, but also experienced the eight-year-long Anshi Rebellion, in the fourteenth year of Tianbao (755), An Lushan blatantly launched the Anshi Rebellion in the name of "Jie Guozhong, Qing Junfang" and killed the chancellor Yang Guozhong.

It is also strange to say that in the tenth year of Tianbao (751), on the third day of An Lushan's birthday, Yang Guifei, who was favored by Tang Xuanzong, specially summoned An Lushan to meet and hold a baptism ceremony for this "eldest son", and there were many rumors.
Yang Guozhong was originally a hooligan, who had little to do and lived in poverty, but because of his favor from his sister Yang Yuhuan, the Yang family chicken dog ascended to heaven, Yang Guozhong also lived a life of flying yellow Tengda, and also found out what Tang Xuanzong liked, so he was promoted to the position of prime minister, the Duke of Weiguo, and held more than forty positions, with no one in sight, and finally had a conflict with An Lushan.
From 755 to the end of 763, yang Guozhong and Yang Guifei both died in The Fifteenth Year of Tianbao, but An Lushan was killed less than 2 years after he was killed by the eunuch Li Pig'er, the second son of An Qingxu.
After killing An Qingxu, Shi Siming, one of the culprits of the An Shi Rebellion, claimed to be the Emperor of Great Yan and was killed by his son Shi Chaoyi in 761, but why did the Tang army fight for 7 years before eliminating the rebels?
At that time, Guo Ziyi, Li Guangbi and other famous generals were still there, and the Tang Dynasty was not without generals to use, but in his old age, many factors could threaten his position of power, and he lost his position in Luoyang, listening to the words of the eunuch Bian Lingcheng, and killing the generals Feng Changqing and Gao Xianzhi, no doubt cutting off his wings.
Yang Guozhong, who was still alive and did not know anything about military affairs, also made a rumor to Tang Xuanzong, saying that if the general Ge Shuhan did not move, he would miss the opportunity and urge the general Ge Shuhan to go to war, and as a result, Ge Shuhan rushed out to launch the Battle of Lingbao, the soldiers were defeated and captured, the Tang army was nearly 200,000 troops, and only more than 8,000 people fled back to Tongguan, so Tongguan could not be defended.
There is also an important figure, that is, Li Longji's third son Li Heng, who was made crown prince in 738, during the Anshi Rebellion, Tang Xuanzong took refuge in Western Shu after the fall of Tongguan, Li Heng ascended the throne on his own in Lingzhou, as Tang Suzong, and Guo Ziyi was made the envoy of Shuofang Jiedushi.
Li Heng's power gradually became stronger, but Li Heng was also jealous of the general Guo Ziyi, and did not entrust the military power to any general, afraid of having a second An Lushan, so he was a little suspicious of his own improper position, Li Heng sent ten feudal towns to quell the chaos, but did not appoint a marshal, and the Tang army that lacked the command of the commander was like a scattered sand, and the outcome could be imagined.
In addition, after Li Heng ascended the throne, he made his son Li Yu the crown prince, and Tang Xuanzong, who was already the emperor of Taishang, was not afraid, but Li Heng was not at ease with his son Li Yu, and Li Yu was worshipped as the Grand Marshal of the Terracotta Army, as the nominal commander of the Tang Army, in case he had real power, Li Heng's imperial throne might be unstable.
In the suspicion and game, the AnShi rebellion was not quelled until the second year after Shi Chaoyi's death, which is also ridiculous, at this time Li Longji and Li Heng also fell ill and died, Li Heng only died 13 days later than Li Longji, and Li Yu was supported as emperor by the eunuch Li Fuguo and others, and the heavens of the Tang Dynasty changed after all.
Even though the Anshi Rebellion was put down, the Anshi Yu Party formed a feudal division in Heshuo, and the Anshi Rebellion caused great damage to northern production, so a large number of northerners began to cross south.