Liu Zhiyuan (Chinese: 劉知遠) (March 4, 895 – March 10, 948), later changed to Liu Gao (劉暠), also known by his temple name as the Emperor Gaozu of Later Han (後漢高祖), was the founding emperor of the Shatuo-led Chinese Later Han dynasty, the fourth of the Five Dynasties during the Five Dynasties and Ten Kingdoms period. He was the older brother of the Northern Han founder Liu Min (Emperor Shizu).
Liu Zhiyuan was born in 895, during the reign of Emperor Zhaozong of Tang, at Taiyuan. His ancestors were of Shatuo extraction. His father Liu Dian (劉琠) served as an officer under the major late-Tang warlord Li Keyong the military governor of Hedong Circuit (河東, headquartered at Taiyuan). His mother was a Lady An, likely Liu Dian's wife. He had at least one other brother of the same father (and possibly of the same mother), Liu Chong. Lady An — likely after Liu Dian's death — bore a son to a man with the surname of Murong. This half-brother of Liu Zhiyuan's was named Murong Yanchao. Liu Zhiyuan was said to be serious in his disposition as a young man. He became a guard soldier for Li Keyong's adoptive son Li Siyuan.
In 907, Li Keyong's archrival Zhu Quanzhong the military governor of Xuanwu Circuit (宣武, headquartered in modern Kaifeng, Henan), who then had the Tang imperial court under his control, seized the throne from Emperor Zhaozong's son and successor Emperor Ai, ending Tang and starting a new dynasty known as Later Liang. Li Keyong and several other warlords refused to recognize him as the new emperor, and Li Keyong, from that on, became effectively the ruler of an independent state of Jin, which, under him and his biological son and successor Li Cunxu, engaged in numerous wars with Later Liang. In 919, there was a battle at Desheng (德勝, in modern Puyang, Henan), a fortress on the Yellow River that Li Cunxu was trying to enlarge. During the battle, Li Siyuan's son-in-law Shi Jingtang, who served as one of the commanders under him, was stricken by a Later Liang soldier, and his horse's armor was broken. Liu Zhiyuan, who was near Shi at that time, gave Shi his own armored horse, while taking Shi's horse and moving gradually, such that the Later Liang soldiers in pursuit believed that he was leading them into a trap, and broke off the pursuit. From this point on, he became close to Shi.
By 932 — at which point Jin had destroyed Later Liang and taken over its territory as a new state of Later Tang, and Li Siyuan was its emperor — Shi was made the military governor of Hedong. He made Liu and Zhou Gui (周瓌) the commanders of his guards, entrusting military matters to Liu and financial matters to Zhou.
In 934, by which time Li Siyuan's biological son Li Conghou was emperor, Li Conghou's chiefs of staff Zhu Hongzhao and Feng Yun, suspicious of both Shi and Li Siyuan's adoptive son Li Congke, then the military governor of Fengxiang Circuit (鳳翔, headquartered in modern Baoji, Shaanxi), decided to move them to other circuits. They issued a number of orders, moving Li Congke from Fengxiang to Hedong, Shi from Hedong to Chengde Circuit (成德, headquartered in modern Shijiazhuang, Hebei), and Chengde's military governor Fan Yanguang to Tianxiong Circuit (天雄, headquartered in modern Handan, Hebei). Li Congke, fearful of what the consequences might be if he gave up his military command, rebelled. He defeated the first army Li Conghou sent against him, commanded by Wang Sitong, and a second army that Li Conghou sent against him, commanded by Kang Yicheng (康義誠), defected and submitted to him. Li Conghou fled the capital Luoyang and headed north, while Shi, hearing of Li Congke's rebellion, was heading toward Luoyang himself, with the intent of bolstering Li Conghou. They encountered each other near Wei Prefecture (衛州, in modern Puyang). Li Conghou was initially pleased at Shi's arrival, but Shi, realizing that it would be difficult to defeat Li Congke at this point, changed his mind and refused to support Li Conghou. Angry at Shi's betrayal, Li Conghou's guards She Shourong (沙守榮) and Ben Hongjin (奔洪進) rebuked Shi and tried to attack him, resulting in a melee in which Sha and Shi's guard Chen Hui (陳暉) killed each other, and Ben committed suicide. Hearing of the melee, Liu led Shi's guard soldiers in and slaughtered all of Li Conghou's guards. Shi then departed for Luoyang to pay allegiance to Li Congke, while leaving Li Conghou, by himself, at Wei. (Li Congke subsequently declared himself emperor, and ordered Li Conghou's death.) While Li Congke had long disliked and was apprehensive of Shi, he, at the urging of Shi's wife (his sister) the Princess of Wei, and the princess' mother Empress Dowager Cao, returned Shi to Hedong.
In 935, there was an incident where Shi, then with the Hedong army at Xin Prefecture (忻州, in modern Xinzhou, Shanxi) to defend against a potential Khitan incursion, was present with an imperial messenger, who was delivering Li Congke's edict issuing the soldiers summer clothing. As the messenger read the edict, the soldiers instead were chanting, "May you live 10,000 years!" at Shi — a blessing that should have been reserved to the emperor. Shi, in fear that he would be seen as contending to the throne, considered what to do. At the urging of the staff member Duan Xiyao (段希堯), Shi had Liu arrest 36 of the leading chanters and execute them. Still, these executions did not calm Li Congke's apprehension of Shi.
In 936, believing that Shi might rebel anyway and that he should catch Shi unprepared, Li Congke issued an edict moving Shi from Hedong to Tianping Circuit (天平, headquartered in modern Tai'an, Shandong) and making the imperial guard general Song Shenqian (宋審虔) the military governor of Hedong. Fearful of the consequences, Shi summoned his key officers and sought their advice. Zhao Ying recommended that he report to Tianping. Xue Rong (薛融) was noncommittal. Liu recommended resistance, a recommendation that joined by Sang Weihan, who further suggested that he seek aid from Khitan's Emperor Taizong. Shi agreed, and had Sang draft a petition for him in which he offered to submit to Emperor Taizong as subject and son and to cede Lulong Circuit (盧龍, headquartered in modern Beijing) and Hedong's prefectures north of the Yanmen Pass (Yanyun 16 Prefectures) to Khitan. Liu argued against the contents of the petition, finding it too humiliating to submit as a son in addition to be subject, and also finding the cession to be unnecessary, but Shi did not listen to him.
When the Later Tang army, commanded by Zhang Jingda, subsequently arrived at Taiyuan, it put Taiyuan under siege. Shi put Liu in charge of Taiyuan's defenses. It was said that Liu carried out discipline fairly and treated the soldiers equally, such that none resented it and all stayed loyal to Shi. When Shi climbed up the city walls to review its defenses, Liu stated to him, "I see that Zhang Jingda and his ilk built tall fortresses and deep trenches, hoping to make the siege last a long time. They have no other special tactics for us to worry about. May you, Lord, send out messengers to try to manage the external relations. Defending this city is easy, and I, Liu Zhiyuan, can do it myself." Shi held his hand and caressed his back, greatly appreciating him.
Later in the year, Emperor Taizong arrived with a Khitan relief army, which engaged the Later Tang army. Shi sent Liu to aid the Khitan army in the engagement, in which the joint Khitan/Hedong forces eventually routed the Later Tang army, killing many. The remnants of the Later Tang army withdrew to Jin'an Base (晉安寨), near Taiyuan, and the Khitan and Hedong armies then had Jin'an surrounded. Under Liu's suggestion, Shi slaughtered the 1,000 Later Tang soldiers that the Hedong army captured.
In winter 936, Emperor Taizong declared Shi Jingtang the emperor of a new state of Later Jin. As part of Shi's orders establishing an imperial administration, Liu Zhiyuan was made the commander of his guards. Subsequently, after the Later Tang army at Jin'an finally capitulated, and the joint Khitan/Later Jin forces prepared to head south toward the Later Tang capital Luoyang, the former Later Tang general Yang Guangyuan (who had assassinated Zhang Jingda and surrendered) was made the commander of the imperial guards, and Liu made the discipline officer of the guards, but was also given the military governorship of Baoyi Circuit (保義, headquartered in modern Sanmenxia, Henan). Eventually, when the joint army reached Lu Prefecture (潞州, in modern Changzhi, Shanxi), Emperor Taizong decided to head back to Liao with his Khitan army to avoid the Han Chinese from being shocked by the presence of Khitans. As he prepared to leave, he stated to Shi, "Liu Zhiyuan, Zhao Ying, and Sang Weihan are all great contributors to your establishment of the empire. Do not abandon them unless they had major faults."