[3] His father Liu Zhiqian (also known as Liu Qian) was then the prefect of Feng Prefecture (封州, in modern Zhaoqing, Guangdong) and was married to a Lady Wei, the niece of Wei Zhou (韋宙), a prior military governor (Jiedushi) of Lingnan East Circuit (嶺南東道, headquartered in modern Guangzhou, Guangdong), which Feng Prefecture belonged to.
[8] Liu Zhi continued serving under his brother, and was first recorded to have participated in a campaign in 902, when Lu Guangchou, who controlled the Qian Prefecture (虔州, in modern Ganzhou, Jiangxi) region as Qian's prefect, attacked Qinghai, capturing Shao Prefecture (韶州, in modern Shaoguan, Guangdong) and giving it to his son Lu Yanchang, and then putting Chao Prefecture (潮州, in modern Chaozhou, Guangdong) under siege.
Liu Yin personally led an army and repelled Lu Guangchou from Chao, and then prepared to attack Shao.
Under Liu Zhi's advice (as Liu Zhi believed that a direct attack would not be successful due to the strength of Lu Yanchang's army), he put Shao under siege to try to wear out Lu Yanchang's defense, but the strategy backfired when, due to high water levels on the river, the Qinghai army's food supplies were disrupted.
Subsequently, after Liu Yin bribed the powerful warlord Zhu Quanzhong the military governor of Xuanwu Circuit (宣武, headquartered in modern Kaifeng, Henan), who had the Tang imperial court under his physical control by that point, Emperor Zhaozong's son and successor Emperor Ai of Tang commissioned Liu Yin as full military governor in 904.
Ma sent troops to safely escort Liu Changlu and Pang back to his territory and had his general Yao Yanzhang take up garrison at Rong Prefecture.
Hearing of the war between two of his vassals, Later Liang's Emperor Taizu sent a delegation led by the official Wei Jian (韋戩) to try to mediate a peace between Ma and Liu.
[12] Liu responded by sending a large tribute of gold, silver, rhinoceros horns, ivory, and other assorted jewels and spices, to Emperor Taizu.
[12] In early 913, Zhu Yougui bestowed the honorary title of acting Taifu (太傅, "emperor's professor") on Liu.
[5] He was subsequently defeated in a countercoup led by his brother Zhu Youzhen the Prince of Jun and committed suicide.
Zhu Youzhen, who took the throne and changed his name to Zhu Zhen,[12] then gave Liu the title of not only military governor of Qinghai, but also of Jianwu Circuit (建武, headquartered at Yong Prefecture), and also created him the Prince of Nanping, a title previously held by Liu Yin.
[2] He commissioned the Later Liang emissaries Zhao Guangyi and Li Yinheng (who were previously detained by Liu Yin),[11] as well as his deputy military governor Yang Dongqian, chancellors.
[2] In 920, at Yang Dongqian's request, Liu Yan established schools and imperial examinations, apparently following the Tang model.
[15] In 922, there was an incident where Liu Yan, believing in the words of a sorcerer that he needed to leave the capital to avoid a disaster, left Xingwang to visit Meikou (梅口, in modern Meizhou, Guangdong), near the Min border.
In response, Liu Yan, believing that Dayou was a phrase from the I Ching that would portend good fortune in battle, changed the era name to Dayou, and also sent the general Su Zhang (蘇章) to take a fleet manned with well-trained archers to try to lift the siege on Feng.
[22] In 930, Liu Yan sent his generals Liang Kezhen (梁克貞) and Li Shoufu (李守鄜) to attack Jiao Prefecture; they captured it and took Khúc Thừa Mỹ (曲承美, son and successor of Khúc Hạo) captive, taking (for the time being) Jinghai Circuit (靜海, Vietnamese: Tĩnh Hải, headquartered at Jiao Prefecture) under Southern Han control and ending the control of the circuit by the Khúc family.
After the fall of the Khúcs, Dương Đình Nghệ - the prefect of Ai Prefecture (愛州, Vietnamese: Ái châu, in modern Thanh Hóa Province, Vietnam) built up a personal army of 3,000 adoptive sons, wanting to take control of Jinghai.
Ngô Quyền then counterattacked, killing more than half of the Southern Han soldiers, including Liu Hongcao.
However, the official Xiao Yi (蕭益) persuaded him that bypassing older sons would cause disturbances, and so Liu Yan did not carry out this plan.
[4] The Zizhi Tongjian, summarizing the opinions from other sources, commented about Liu Yan's reign:[4] Gaozu [(i.e., Liu Yan)] was observant and capable of political tactics, but was self-important, often referring to the emperors of the Central Plain as "prefect of Luo Prefecture" [(i.e., Luoyang, which often served as the capital of Five Dynasties states)].
The Lingnan region was where rare jewels could be gathered, so he was luxurious in his living and favored beautiful things, adorning his palaces with gold, jades, and pearls.
In his late years, he was particularly suspicious of the intelligentsia, believing that the officials would be more concerned about the welfare of their descendants rather than of the state, and therefore became trusting of eunuchs.