唐昭宗
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.