Liu Yan (died 194), courtesy name Junlang, was a warlord who lived in the late Eastern Han dynasty. He was also a member of the extended family of the Han emperors. For most of his career he served as Governor of Yi Province (covering present-day Sichuan and Chongqing), which he developed into an independent power base. His domain was passed on to his son Liu Zhang, and eventually to Liu Bei, who founded the state of Shu Han during the Three Kingdoms period.
Liu Yan was a descendant of Liu Yu, who was Prince of Lu during the first half of the Han dynasty. Because his branch of the Liu family was powerful, and because he proved himself to be an able statesman, he quickly rose through the ranks of the court. The highest post he reached was that of Minister of Ceremonies (Taichang, 太常), or person responsible for ceremonies related to the emperor. During the reign of Emperor Ling, the central court became a politically dangerous place, which Liu Yan wanted to distance himself from. An advisor of his, Dong Fu (董扶), suggested requesting to be governor of Yi Province, at that time considered a backward and distant province of the Han empire. Liu Yan took the advice, and with his private army set off for his new post in 188.
After arriving in Yi Province, Liu Yan was confronted with his first crisis. Ma Xiang (馬相) and Zhao Zhi (趙祗) started a rebellion in the region, claiming to be part of the Yellow Turban Rebellion. Liu Yan enlisted the help of powerful local families to raise an army and put down the rebellion.
Once firmly in control of the region, he plotted to gain independence from the central Han government. The first step in his plan was to send Zhang Lu and Zhang Xiu (張脩) to attack the forces of the official Han governor of Hanzhong, Su Gu (蘇固) and take over his territory. Zhang Lu first killed Zhang Xiu, and after absorbing the latter’s armies he successfully managed to kill Su Gu and take control of the territory, which created an independent buffer state between Liu Yan’s Yi Province and the Han central government.
His next step in gaining control of the region was to rein in the power of the local families, who had their own wealth and large private armies. He executed the leaders of over 10 families, but another powerful family leader Jia Long (賈龍) banded together with others and rebelled. Although the armies of the families were powerful, Liu Yan’s forces eventually prevailed. The next threat would be from the Qiang people, who attacked Liu Yan’s capital of Mianzhu (綿竹). However, Liu Yan’s forces were able to successfully defend their territory from being ravaged.
In 194, when Li Jue and Guo Si gained control of Chang’an after Dong Zhuo’s death, three of Liu Yan’s sons (Liu Fan, Liu Dan, and Liu Zhang) were in Chang’an serving in various government posts. Liu Yan joined forces with Han Sui and Ma Teng in an attempt to attack the capital and seize it. With the help of his sons in the city, the armies attacked, but were defeated. In the hasty retreat, Liu Fan and Liu Dan were captured by Li Jue’s forces as they tried to flee Chang’an, and were tortured and killed. Liu Zhang, however, barely managed to escape and join up with his father, who returned once again to Yi Province.
In summer of the same year, Liu Yan’s residence in Mianzhu was struck by lightning and burned down, forcing him to relocate his capital to Chengdu. Soon afterward, his third son Liu Mao died from illness. It is said that the grief caused by the loss of three sons caused him to develop an illness on his back, which would eventually cause his death later in the year.
His death left his fourth and youngest son Liu Zhang in control of Yi Province.
In Luo Guanzhong’s historical novel Romance of the Three Kingdoms, Liu Yan was the governor of You Province (幽州) in northern China during the events of the Yellow Turban Rebellion. He met Liu Bei, who rallied an army of volunteers to help him fight the Yellow Turban rebels. In Chen Shou’s Records of Three Kingdoms, however, there is no record of Liu Yan assuming governorship of You Province.