In the history of our country, the Tang and Song dynasties were relatively powerful, especially the Tang Dynasty, with a vast territory, a country of peace and security, and a dynasty of all nations, a prosperous scene, generally known as the Tang Dynasty. The Song Dynasty was not weak, accounting for about 22.7% of the world's total economic output, and its economic prosperity was unprecedented. Incredibly, however, the emperors of the Tang and Song dynasties often fled.

The early emperors of the Tang Dynasty were relatively strong, such as Emperor Taizong and Li Shimin, and with the strong national strength, there was no escape. However, after the outbreak of the Anshi Rebellion, with the prosperity of the Kaiyuan and Tianbao prosperous times pioneered by Tang Xuanzong Li Longji, the Tang Dynasty began to gradually decline.
In 755, An Lushan (The "Gan Son" of Emperor Xuanzong of Tang) rebelled from Fanyang (present-day Beijing) and soon captured Luoyang. At that time, the capital was Chang'an, but Luoyang was the eastern gateway to the capital Chang'an, and Chang'an was seriously threatened. Tang Xuanzong saw that An Lushan was not good and began to flee to Sichuan. However, I am embarrassed to say that I ran away, and the next edict is: the royal driving pro-march. During the Qing Dynasty, the Eight-Nation Alliance invaded Beijing, and Cixi fled to Xi'an with the emperor, known as the "Two Palaces of the West Hunt", which is similar to this.
Tang Xuanzong ran away, leaving the crown prince Li Heng to oversee the country. Who knew that he ran south to Sichuan, and the prince ran afterwards. However, the crown prince fled north to Lingwu (Ningxia Lingwu), where he was proclaimed emperor, that is, Emperor Suzong of Tang, and Emperor Xuanzong of Tang became Emperor Taishang.
After the death of Emperor Suzong of Tang in 763, the crown prince Li Yu succeeded him as Emperor Of Tang. In September of that year, 200,000 soldiers and horses of Tubo slaughtered Chang'an, and soon the troops came to the city. Emperor Tang fled all the way to Shaanzhou (陕州, in present-day Sanmenxia City, Henan Province), where he was known as "Out of Luck", which clearly inherited the fine genes of his grandfather Tang Xuanzong.
Emperor Daizong's son Li Shi (kuò) of Emperor Dezong of Tang also escaped, and Yao Lingyan, the envoy of Jingyuan Jiedu (泾原節度) (whose jurisdiction was near present-day Pingliang, Gansu), led 5,000 soldiers to escort the capital Chang'an, and as a result, King Jingzhao Yin greeted them with coarse tea and light rice.
The angry Jingyuan soldiers began to rebel against the capital, and Tang Dezong fled from Chang'an in fright, fleeing from Xianyang to Fengtian County (present-day Qian County, Xianyang City, Shaanxi Province). After some time in Fengtian, he ran to Hanzhong again. If the situation becomes worse, it is estimated that it will run to Chengdu.
In 881, hearing that Huang Chao had conquered Luoyang and was attacking Chang'an, Emperor Li of Tang was so frightened that he crossed the mountains and fled to Chengdu for refuge. After Huang Chao withdrew from Chang'an, Emperor Tang dared to return to Chang'an. After Tang Zhaozong's death, Tang Zhaozong Li Ye was even more miserable, not like the emperor at all, and he couldn't run when he wanted to.
Fengxiang Jiedu made Li Maozhen invade Chang'an, frightening Tang Zhaozong to flee, and preparing to go to Shanxi to defect to Li Keyong, but was held hostage by Han Jian, the envoy of Huazhou Jiedu, and placed under house arrest for two years. In 901, he was taken hostage by Li Maozhen to Fengxiang (Baoji, Shaanxi Province), and later taken by Zhu Wen to Luoyang, where he was killed.
The first Song emperor to escape was Zhao Guangyi, emperor taizong of Song, who in 979 made a northern expedition to the Northern Han Dynasty and then forcibly northern khitan (Liao). At the Battle of Gaoliang River, the Song army was defeated. Zhao Guangyi was almost captured, and in a hurry, he could not care about his identity, so he found a donkey cart in Zhuozhou and ran wildly to escape the disaster.
In 1004, Empress Xiao of the Khitan dynasty led an army of 200,000 men south with emperor Yelü Longxu of Liao to attack the Song Dynasty, and Zhao Heng, the Emperor of Song, was so frightened that he almost fled to Nanjing or Chengdu. However, fortunately, he was stopped by Kou Zhun and persuaded Song Zhenzong to go north to Liaoyuan to meet the battle, which could only be regarded as an attempted escape.
In 1126, when the Jin army approached the city of Kaifeng Province in Tokyo, Emperor Huizong of Song hurriedly gave the throne to the crown prince Zhao Huan and fled to Zhenjiang Province (Zhenjiang, Jiangsu). Four months later, Emperor Huizong of Song ran back to Kaifeng, only to be taken prisoner of the Jin Bing with Song Qinzong and detained in the Five Kingdoms City.
Emperor Huizong of Song's son Zhao Shuo (赵構) proclaimed himself emperor of the Southern Song Dynasty at GuideFu (present-day Shangqiu, Henan) in Nanjing, and fled south in fear, neither in The capital Zhenjiang nor Nanjing, but instead of the capital Lin'an (Hangzhou), which was actually the capital of the country. Because he was frightened by jinbing searching the mountains and inspecting the sea, he chose Hangzhou to facilitate the sea to escape.
In 1276, the Mongol Yuan army approached Lin'an City, Zhao Yi (also known as Zhao Xian) surrendered, and the Southern Song Dynasty fell. Ministers who did not want to surrender fled to the south with Zhao Fu and Zhao Fu, and established Zhao Fu on the throne in Fuzhou. Subsequently, the Yuan army entered Fujian, and Zhao Yan fled to Guangdong, accidentally falling into the water, frightened and dying of excessive illness. After Zhao Yu's death, Zhao Fu took the throne and fled to Yashan, where he was carried by Lu Xiufu and jumped into the sea.
In summary, there were 6 emperors each from the Tang Dynasty and the Song Dynasty, for a total of 12. It is said that the Tang and Song dynasties were relatively strong, but there were so many emperors who fled, and the reasons were different. The Tang Emperors fled mostly out of civil strife, because the power of the fanzhen was too large, and the imperial power was relatively weak, so they could only run.
Although the economy of the Song Dynasty was strong, due to the heavy literature and suppression of martial arts, coupled with the loss of the barrier of youyun Sixteen Prefectures, the military ability to resist foreign invasion was too weak, and the Song Emperor fled mostly because of external troubles.