Liu Yan (; died 23 AD), courtesy name Bosheng (), was a Chinese general of one of the major uprisings against the Xin dynasty and its emperor, Wang Mang. Although he was militarily successful, he died early as a victim of political intrigue. His younger brother Liu Xiu, however, would eventually found the Eastern Han dynasty.

Family background
Liu Yan was the sixth generation descendant of Emperor Jing of the Western Han dynasty. He was the son of Liu Qin (), magistrate of Nandun county (). Liu Qin was the son of Liu Hui (), vice governor in charge of military affairs for Julu Commandery (). Liu Hui was the son of Liu Wai (), governor of Yulin Commandery (). Liu Wai was the son of Liu Mai (), known posthumously as Marquess Jie of Chongling (). Liu Mai was the son of Liu Fa (), known posthumously as Prince Ding of Changsha (). The prince of Changsha was a brother of Emperor Wu, a Han emperor, and also a son of Emperor Jing Liu Qi.

Liu Qin was married to Fan Xiandu (樊娴都), a daughter of Fan Chong (), and they had three sons: Liu Yan, Liu Zhong (), and Liu Xiu.  Liu Qin died early, so the brothers were raised by their uncle Liu Liang ().  Liu Yan was ambitious, and ever since Wang Mang usurped the Han throne in 9 AD establishing Xin Dynasty, Liu Yan was constantly considering starting a rebellion to restore the Han Dynasty.  Liu Xiu, in contrast, was a careful man who was content to be a farmer.

Rebellion against Xin
In 22 AD, with rebellions breaking out across the empire against Wang Mang's rule, Liu Yan prepared his rebellion.  He planned, along with his brothers, and Li Tong () and his cousin Li Yi (), to kidnap the governor for Nanyang Commandery (modern Nanyang, Henan) and call for the people of the commandery to join him.  When the young men of Chongling were told about the planned rebellion, they hesitated in joining until they were told that Liu Xiu was also involved. However, the news of the planned rebellion leaked out, and Li Tong and Li Yi barely escaped with their lives (but their family was slaughtered).  Liu Yan changed his plan and persuaded two branches of the Lülin, the Xinshi Force () and Pinglin Force () to join forces with him, and they had some military success.  Encouraged, Liu Yan launched a frontal assault against Wancheng (), the capital of Nanyang Commandery but suffered a major defeat.  Liu Yan and Liu Xiu, along with their sister Liu Boji () survived, but their brother Liu Zhong and sister Liu Yuan died in the battle.  Liu Yan's allies, seeing his defeat, considered leaving him, but Liu Yan was able to persuade them, along with another branch of the Lülin, the Xiajiang Force (), to join him.  In 23 AD, Liu Yan's forces had a major victory against the Xin dynasty forces, killing Zhen Fu (), the governor of Nanyang Commandery.

Being passed over as emperor
By this point, other rebel leaders were becoming jealous of Liu Yan's capabilities, particularly as many of their men admired Liu Yan and wanted him to become the new emperor of the restored Han Dynasty. The other rebel leaders chose rebel leader, Liu Xuan, a third cousin of Liu Yan, who had taken the title General Gengshi () and who was considered a weak personality, and requested that he be made emperor. Liu Yan initially opposed this move and instead suggested that Liu Xuan carry the title "Prince of Han" first (echoing the founder of the Han Dynasty, Emperor Gao). The other rebel leaders dismissed this suggestion, and in early 23 AD, Liu Xuan was proclaimed Gengshi Emperor.  Liu Yan became prime minister (大司徒, dasitu).

Death
After Gengshi Emperor's forces decisively defeated Wang Mang's remaining army at the Battle of Kunyang (in which Liu Yan's brother Liu Xiu played a major part), Gengshi Emperor quickly became at least nominally acknowledged by most of the empire as the legitimate Han emperor.  However, Gengshi Emperor remained fearful of Liu Yan's capabilities and keenly aware that many of Liu Yan's followers were angry that Liu Yan had not been made emperor.  In particular, Liu Ji (), was very critical of Gengshi Emperor.  In response, Gengshi Emperor arrested Liu Ji and wanted to execute him, but Liu Yan tried to intercede to stop the execution. Gengshi Emperor, encouraged by Li Yi (who had by that point turned against Liu Yan) and Zhu Wei (), took this action by Liu Yan as an excuse to execute Liu Yan as well.  Liu Xiu only survived because Gengshi Emperor then regretted having executed Liu Yan.

After Liu Yan's death, Liu Xiu looked after Liu Yan's sons Liu Zhang () and Liu Xing () and raised them.  When Liu Xiu proclaimed himself emperor, founding the Eastern Han Dynasty, in 25 AD, he took steps to honour Liu Yan's sons.  In 26 AD, he created Liu Zhang Prince of Taiyuan and Liu Xing Prince of Lu (and made Liu Xing the heir to his other brother, Liu Zhong).  In 39 AD, he posthumously honoured Liu Yan with the title Prince Wu ("martial prince") of Qi (as his son Prince Zhang had, by that point, been moved to the Principality of Qi).

References

23 deaths
Han dynasty generals
Han dynasty chancellors
1st-century government officials
Year of birth unknown
1st-century executions
Executed Han dynasty people
People executed by the Han dynasty by decapitation
Politicians from Xiangyang
Executed people from Hubei
Xin dynasty
1st-century Chinese people