Li Gao or Li Hao (; 351–417), courtesy name Xuansheng (), nickname Changsheng (), formally Prince Wuzhao of (Western) Liang (), was the founding duke of the Chinese Western Liang dynasty during the Sixteen Kingdoms period. While he claimed only the title of duke during his reign, he was posthumously honored with the princely title. He was initially a Northern Liang official, but in 400, he seceded from Northern Liang's prince Duan Ye's rule and established his own independent state.  His state only lasted for 21 years, but his descendants would remain key officials and nobles throughout Northern Wei, Western Wei, Northern Zhou, and Sui dynasty, and one of them, Li Yuan, would found the Tang dynasty in 618. After the founding of the Tang dynasty, he was posthumously honored as Emperor Xingsheng ().

Prior to Western Liang's establishment 
Li Gao was born in 351, and was a posthumous child of his father Li Chang (), who traced his ancestry to the Han dynasty general Li Guang.  After Li Chang's death, Li Gao's mother married a man named Song, and they had at least one son, Song Yao ().  In Li Gao's youth, he was known to be studious, rational, and open-minded.  When he grew older, he also studied the military strategies of Sunzi and Wu Qi.  He had, for a time, lived in the same house with his half-brother Song Yao and Guo Nen (), a minister of Later Liang's founding emperor Lü Guang known for his magical and prophetic abilities.  Guo once told Song, "Your place will be among the most honored of all subjects, but Mr. Li will one day found an independent state.  This will happen when a mare bears a pony with a white forehead."

After Lü Guang's official Duan Ye, with support from the generals Juqu Nancheng () and Juqu Mengxun, broke away from Later Liang and established Northern Liang in 397, Li Gao became a county magistrate under Duan Ye's governor of Dunhuang Commandery (roughly modern Dunhuang, Gansu), Meng Min ().  When Meng died in 400, the officials of Dunhuang Commandery, because Li Gao was popular with the people, asked him to take over.  Initially, Li Gao was hesitant, but Song advised him to accept, stating to him that a pony with a white forehead had just recently been born.  Li Gao therefore accepted and requested confirmation from Duan Ye, and Duan Ye agreed.

However, Duan Ye's official Suo Si (), a friend of Li Gao's, warned Duan Ye of Li Gao's ambitions and advised Duan Ye not to allow Li Gao to remain in control of Dunhuang.  Duan Ye therefore sent Suo Si to take over Li Gao's post.  Li Gao, in fear, initially was going to receive Suo and turn over authorities to him.  At the urging of Song and Zhang Miao (), however, Li Gao first sent messengers to flatter Suo, and instead made a surprise against Suo, defeating him and forcing him to flee back to the Northern Liang capital Zhangye (張掖, in modern Zhangye, Gansu).  Li Gao, angry at what he saw as Suo's betrayal, then sent messengers to Duan Ye demanding that he execute Suo.  Juqu Nancheng, who also disliked Suo, advised Duan Ye to execute Suo to pacify Li, and Duan Ye did so.

Later in 400, Li Gao's subordinate Tang Yao () declared a general secession by the six commanderies around Dunhuang and offered the rulership to Li Gao.  Li Gao accepted and took the title of Duke of Liang, thus establishing Western Liang.

Early reign 
Li Gao set his capital at Dunhuang.  In 401, the important Northern Liang city Jiuquan (酒泉, in modern Jiuquan, Gansu) defected to him, and particularly in light of Later Qin's attacks on Later Liang that year, this caused Juqu Mengxun (who had killed Duan Ye earlier that year and taken over as the ruler of Northern Liang) to consider surrendering his state to Later Qin, although Juqu Mengxun later decided against it and continued his state's existence.  In light of Later Qin's advances, however, Li Gao nominally submitted to Later Qin as a vassal.

In 404, Li Gao's heir apparent Li Tan () died, and he created Li Tan's younger brother Li Xin as the new heir apparent.

In 405, Li Gao claimed additional honorific titles, and at the same time, while not renouncing Later Qin, also sent messengers to Jin, requesting to be a vassal.  He also moved his capital from Dunhuang to Jiuquan, closer to the Northern Liang capital Zhangye, to put additional pressure on Northern Liang.  He also wrote a letter to all of his sons, which is still extant, encouraging them to be open-minded and think logically, and be mild in temperament.

In 406, Li Gao entered into a peace agreement with Southern Liang's prince Tufa Rutan, with an implicit understanding of an alliance against Northern Liang, but no actual joint military action was ever taken.  Later that year, Juqu Mengxun made an attack on Jiuquan, and Li Gao suffered a defeat to Juqu Mengxun near Jiuquan and was forced to return to the city to defend it against a siege, but Juqu Mengxun, not having enough strength to siege it, withdrew.

Late reign 
In 408, not having received response from Jin when he sent messengers in 405, Li Gao sent another messenger with his petition to the Jin capital Jiankang (建康, modern Nanjing, Jiangsu).

In 410, Juqu Mengxun attacked Western Liang again and defeated Li Gao's heir apparent Li Xin in battle, capturing the general Zhu Yuanhu ().  Li Gao ransomed Zhu with silver and gold, and Juqu Mengxun returned Zhu and made peace with Li Gao.

In 411, Juqu Mengxun, despite the prior peace agreement, made a surprise attack on Western Liang.  Li Gao guarded his capital and refused to engage Juqu Mengxun, who was then forced to withdraw when his army ran out of food supply.  Li Gao then sent Li Xin to attack the Northern Liang troops in retreat, and Li Xin had a major victory over Juqu Mengxun, capturing his general Juqu Bainian ().

In 416, Li Gao's subordinate Suo Chengming () suggested that he attack Northern Liang.  Li Gao summoned Suo and explained to him that he had insufficient strength to do so—and that Suo, if he actually had usable plans, should offer them rather than simply suggesting an attack.  In fear and shame, Suo withdrew from his presence.

In 417, Li Gao grew ill, and he entrusted Li Xin to his brother Song Yao, stating, "After I die, the heir apparent is your son.  Please discipline him accordingly."  He then died, and Li Xin succeeded him as duke.  Although Li Gao only claimed a ducal title, he was posthumously honored as a prince.

Personal information 
 Father
 Li Chang () (d. 350 or 351), posthumously honored as Duke Jian
 Wives
 First wife, name unknown
 Lady Yin, mother of Li Xin
 Children
 Li Tan (), the Heir Apparent (d. 404)
 Li Xin (), the Heir Apparent (created 404), later duke
 Li Rang (), Marquess Mu of Xinxiang
 Li Xun (), later ruler
 Li Fan ()
 Li Yu ()
 Li Hong ()
 Li Tiao ()
 Li Liang ()
 Li Jingshou () (d. 437), wife of Juqu Mujian, prince of Northern Liang

References

 Book of Jin, vol. 87.
 Book of Wei, vol. 99.
 Spring and Autumn Annals of the Sixteen Kingdoms, vol. 8.
 Zizhi Tongjian, vols. 111, 112, 113, 114, 115, 116, 117, 118.

Western Liang (Sixteen Kingdoms) dukes
351 births
417 deaths
Northern Liang people
Later Qin generals
Jin dynasty (266–420) people
Tang dynasty
Generals from Gansu
Founding monarchs