Liu Yan, styled Junlang, was a native of Jingling, Jiangxia, and a descendant of King Lu of the Han Dynasty. During the Yuanhe period of Emperor Zhang, the Liu family moved to Jingling and settled there. When Liu Yan was young, he served as an official in the state and county, and due to his royal lineage, he was appointed as a Gentleman of the Palace. Later, he resigned from his position to mourn his teacher, Zhu Gong. He lived on Mount Yangcheng, devoted himself to studying and teaching, and was recognized as a talented and upright individual, and was summoned to work at the Ministry of Rites. He later held various official positions such as Luoyang Prefect, Governor of Jizhou, Prefect of Nanyang, Grand Master, and Grand Minister of Ceremonies.
Witnessing the political corruption during the reign of Emperor Ling, as well as ongoing internal issues within the royal family, Liu Yan submitted a memorial suggesting: "Current governors and prefects rely on bribery to obtain their positions, cruelly exploiting the people, leading to rebellions everywhere. We should select honest and respected ministers to stabilize the regions." Liu Yan wanted to find a quiet place to escape the chaotic times, so he requested to go to Jiaozhi as a governor. Before this request could be granted, Dong Fu, the imperial attendant, privately told Liu Yan, "The capital is about to be in chaos soon, and Yizhou has the presence of the Emperor." Upon hearing Dong Fu's words, Liu Yan became even more eager to go to Yizhou.
Coincidentally, the taxation and corvee imposed by the Governor of Yizhou, Xi Jian, were very heavy, leading to widespread rumors. Furthermore, the Governors of Bingzhou, Zhang Yi, and Liangzhou, Geng Bi, were both killed. Liu Yan saw this as a prime opportunity. He was appointed as the Military Inspector, while also serving as Governor of Yizhou, and was granted the title of Marquis of Yangcheng. He planned to arrest Xi Jian and bring him to justice. Dong Fu also requested a position as Commandant in the western territory of Shu County, while Zhao Wei, Prefect of Baxi Taicang, also resigned. They all followed Liu Yan to Yizhou.
At that time, a rebel named Ma Xiang rose up in Yizhou, along with Zhao Zhi. They claimed to be part of the Yellow Turban Army in Mianzhu County and quickly gathered thousands of weary commoners within a day or two. They first killed the county magistrate Li Sheng in Mianzhu, and local officials and people responded one after another, bringing their numbers to over ten thousand. They then captured Lu County, killed the governor of Yizhou, Liu Yan, and attacked Shu County and Jianwei. In less than a month, they threw these three counties into chaos. Ma Xiang even proclaimed himself emperor, commanding tens of thousands of troops.
Yizhou official Jia Long, along with hundreds of personal guards in the eastern region of Jianwei, mobilized the common people and gathered more than a thousand individuals to attack Ma Xiang and his followers. After several days of battle, they successfully defeated Ma Xiang and restored peace in Yizhou. Jia Long then selected soldiers to welcome Liu Yan back. Liu Yan relocated his administration to Mianzhu, pacifying the rebellious people with conciliatory policies while secretly plotting his next move. Zhang Lu's mother was a believer in the Cult of Ghosts and had a good relationship with Liu Yan, often visiting his home. Therefore, Liu Yan sent Zhang Lu to Hanzhong as the Inspector of Justice, instructing him to block mountain passes and kill imperial envoys. Liu Yan also reported to the court that bandits had cut off the roads, making it impossible for travel, and took the opportunity to kill some influential figures in the province, including Wang Xian and Li Quan, totaling more than ten people, to consolidate his power. As a result, the Governor of Jianwei, Ren Qi, and Jia Long launched a counterattack against Liu Yan but were ultimately defeated and killed.
Liu Yan's power grew increasingly powerful, manufacturing over a thousand imperial carriages. The Governor of Jingzhou, Liu Biao, even wrote a letter to Liu Yan, comparing Liu Yan to Zixia in the West River, leading people to question whether he was a sage. At that time, Liu Yan's son, Liu Fan, was the General of the Left, Liu Dan was the Imperial Secretary, and Liu Zhang was the Commissioner of Imperial Carriages. They all followed Emperor Xian in Chang'an, except for Liu Yan's son, Liu Mao, who held a minor command position and always followed Liu Yan. Emperor Xian sent Liu Zhang to persuade Liu Yan, but Liu Yan detained Liu Zhang, preventing him from leaving. At this time, General Ma Teng, who was leading a rebellion in Meixian County, conspired secretly with Liu Yan and Liu Fan, planning to attack Chang'an with troops. However, Liu Fan's plan was exposed; he fled to Huaili, Ma Teng was defeated and retreated to Liangzhou, Liu Fan was killed, and Liu Dan was captured and executed. The Imperial Clerk, Pang Xi, and Liu Yan were old friends, so he recruited Liu Yan's grandson to enter Shu. At this time, Chengdu, Liu Yan's capital, was burned by a sky fire, the carriages were all destroyed, and many common people's homes were also destroyed. Liu Yan relocated his residence to Chengdu, mourning his son Liu Fan's death while fearing the sky fire. In the first year of Xingping, he developed a carbuncle, which caused poisonous sores on his back, and died. The high-ranking officials of Yizhou, including Zhao Wei, believed Liu Zhang to be gentle and benevolent, so they recommended him for the position of Governor of Yizhou. The court issued an edict appointing him as the Military Supervisor, leading the Governor of Yizhou, and also appointed Zhao Wei as the General Who Conquers the East, leading the army to attack Liu Biao.
Liu Zhang, styled Jiyu, inherited his father's position, and Zhang Lu became increasingly arrogant and domineering, not listening to Liu Zhang's words. In a fit of anger, Liu Zhang killed Zhang Lu's mother and brother, thus creating a deadly feud. Liu Zhang repeatedly sent Pang Xi and others to attack Zhang Lu, but they were all defeated. Because most of Zhang Lu's army was stationed in Baxi Commandery, Liu Zhang appointed Pang Xi as the Administrator of Baxi, leading troops to defend against Zhang Lu. Later, the relationship between Pang Xi and Liu Zhang deteriorated, and Zhao Wei led a rebellion but was ultimately defeated and killed in battle, all due to Liu Zhang's indecisiveness and his trust in unscrupulous people.
Liu Zhang heard that Cao Cao was attacking Jingzhou and had already occupied Hanzhong, so he sent Yinpugu from Henei to pay a visit to Cao Cao. Cao Cao appointed Liu Zhang as the General of Might and Liu Zhang's brother, Liu Mao, as the General who Pacifies Bandits. Unfortunately, Liu Mao suffered from a manic disorder and soon passed away. Liu Zhang then sent an attendant, Zhang Su, with three hundred soldiers and valuable gifts to present to Cao Cao, who appointed Zhang Su as Administrator of Guanghan. Liu Zhang once again sent an attendant, Zhang Song, to pay a visit to Cao Cao, but by that time, Cao Cao had already taken Jingzhou, defeated Liu Bei, and paid Zhang Song no mind. Zhang Song thus bore a grudge.
At that time, Cao Cao suffered a defeat in the Battle of Chibi and an epidemic broke out, resulting in heavy casualties. After Zhang Song returned to Shu, he began to discredit Cao Cao, urging Liu Zhang to break ties with him and suggesting to Liu Zhang, "Liu Bei is your closest ally; you should work with him." Liu Zhang, upon hearing his words, sent Fa Zheng to establish contact with Liu Bei, and shortly after, Fa Zheng and Meng Da were sent with several thousand soldiers to help Liu Bei defend himself. Fa Zheng later returned to Shu. Zhang Song later told Liu Zhang, "Many generals in the province, such as Pang Xi and Li Yi, have become arrogant and have ulterior motives due to their great achievements. If we do not cooperate with Liu Bei, with enemies attacking from the outside and internal unrest among the people, we will surely fail!" Liu Zhang trusted Zhang Song's words and sent Fa Zheng to invite Liu Bei. Liu Zhang's secretary Huang Quan assessed the situation, and even Wang Lei from Guanghan attempted to advise him by taking his own life at the provincial government gate, but Liu Zhang ignored him and ordered full support for Liu Bei, who he welcomed as if he were returning home.
Liu Bei arrived north of Jiangzhou, crossed the Dianjiang River and arrived at Fuxian, still three hundred and sixty miles away from Chengdu, in the sixteenth year of the Jian'an era. Liu Zhang led over thirty thousand infantry and cavalry, with splendid chariots, horses, and tents, their banners fluttering, and proceeded to Fuxian to meet Liu Bei. The soldiers brought by Liu Bei got along famously, celebrating and feasting for over a hundred days. Liu Zhang provided supplies for Liu Bei to go and subdue Zhang Lu, after which they parted ways.
In the following year, Liu Bei reached Jiameng, then led his troops southward, achieving success along the way.
For nineteen years, Liu Bei besieged Chengdu for dozens of days. Inside the city were still thirty thousand elite soldiers, with enough food to last them a year. The officials and common people were determined to fight to the death. Liu Zhang said, "My father and I have been in Yizhou for over twenty years, without much kindness towards the people. The people have been fighting for three years, the land has been left barren, all because of me. Can they truly find peace?" So he opened the city gates and surrendered, and everyone started crying. Liu Bei relocated Liu Zhang to Gong'an in Nanjun, returning all his property and the general's seal to him. Sun Quan killed Guan Yu, took over Jingzhou, and appointed Liu Zhang as the Governor of Yizhou, stationed in Zigui. After Liu Zhang's death, the powerful figures in the south rebelled and joined Sun Quan. Sun Quan then appointed Liu Zhang's son Liu Chan as the Inspector of Yizhou, responsible for the border regions of Jiaozhou and Yizhou. Prime Minister Zhuge Liang pacified the south, and Liu Chan returned to Dong Wu, becoming the Deputy Chief of the Censorate. Initially, Liu Zhang's eldest son, Liu Xun, was married to the daughter of Pang Xi. After Liu Bei pacified Shu, Pang Xi became the Left General Sima, and Liu Zhang requested through Pang Xi to keep Liu Xun, so Liu Bei appointed him as the Cavalry Commander. Therefore, Liu Zhang's two sons were one in Dong Wu and one in Shu Han. The commentary says: In the past, Wei Bao believed Xu Fu's prophecy and brought Bo Ji back home. Liu Xin saw the prophecy of the chart and changed his name, but in the end, he still couldn't save his life and ended up letting Emperor Qing and Emperor Cheng of Han become emperors. This illustrates that divine prophecies should not be dismissed, and one must respect the mandate of heaven. Liu Yan listened to Dong Fu's words and was determined to occupy Yizhou, believed in fortune-tellers, and sought a marriage alliance with the Wu family, even hastily bringing the emperor's ceremonial equipment, hoping to seize control of the realm. He was really confused! Liu Zhang, with limited ability, occupied a piece of land in chaotic times, inviting disaster. This is a natural order, and his loss of Yizhou is not an unfortunate occurrence.