Emperor Han Huandi 漢桓帝 (r. 146－167), personal name Liu Zhi 劉志, courtesy name Yi 意, was one of the personally stronger rulers of the Later Han dynasty 後漢 (25-220 CE). It was during his time that the conflict between the state officials and the eunuchs aggravated. Liu Zhi was a great-grandson of Emperor Zhang 章帝 (r. 76-88 CE), the third emperor of the Later Han dynasty. He had inherited the title of Marquis of Liwu 蠡吾侯 from his father and succeeded Emperor Zhi 漢質帝 (r. 145-146 CE) as a ruler of the Later Han dynasty. His mother was a Lady Yan 匽氏.
In 146 Liu Zhi was called to the court in Luoyang 洛陽 (modern Luoyang, Henan) by Empress Dowager Liang 梁太后. He married to the Empress Dowager's younger sister. When Emperor Zhi died, the powerful Empress Dowager and her brother Liang Ji 梁冀 secured the imperial palace by the guards and enthroned Liu Zhi. He is known in history with his dynastic title of Emperor Huan.
At that time he was only fifteen sui old, so that the Empress Dowager continued reigning for the emperor. From 150 CE on Emperor Huan personally took over regency, and Empress Dowager Liang retired, without giving up control of affairs totally. Her brother Liang Ji was raised in his title of nobility, and his wife was bestowed the title of Lady Xiangcheng 襄城君. Both lived in great luxury and occupied large tracts of land for their entertainment and for revenues.
Liang Ji was known for his cruelty, extravagance and his arrogance. When his sister, the Empress Dowager, died in 159, Emperor Huan secretly arranged the arrest of Liang Ji with the help of the chief eunuch Shan Chao 單超. Liang Ji was forced to remit his seal, and he and his wife commited suicide. Their whole family was extinguished in order to prevent further interference in government affairs. Shan Chao was highly rewarded, was given the title of marquis, and when he died, allowed a prodigious funeral.
The other eunuchs that had participated in the destruction of the house of Liang, namely Zuo Guan 左悺, Ju Ai 具璦, Xu Huang 徐璜 and Tang Heng 唐衡, were likewise highly rewarded. The influential position of the eunuchs posed a threat to a group of high state officials. Lead by Li Ying 李膺, Guo Tai 郭泰 and Jia Biao 賈彪, they openly attacked the eunuchs. The latter felt challenged by this threat and in 166 accused Li Ying and his group as a clique trying to badly influence the emperor. Emperor Huan had Li Ying arrested and 200 more persons that were dubbed as a "court clique" (dang 黨). They were later released but were not allowed to occupy any office during lifetime. This incident is called the first "prohibition of court factions" (danggu 黨錮).
In the same year, an embassy from the country of Daqin 大秦 (somewhere in the Levant, probably part of the Roman Empire) was received at the court in Luoyang. This event is often called the first encounter between China and Europe or Western Asia.
During the reign of Emperor Huan, several rebels throughout the empire proclaimed themselves emperor, like Li Jian 李堅, Cheng Jing 陳景, Guan Bo 管伯, Pei You 裴優, Li Bo 李伯, Gai Deng 蓋登, Dai Yi 戴異, or Long Shang 龍尚. A lot of them attracted followers by explaining their magical potencies. The rebellions lead by them can therefore be called proto-Daoist movements that prepared the ground for the later successful movements of the Five-pecks-of-grain school (wudoumi dao 五斗米道) in Sichuan at the end of the Later Han period.
Emperor Huan was buried in the tomb mound Xuanling 宣陵. He had no son and was succeeded by the Marquis of Jieduting 解瀆亭侯, Liu Hong 劉宏, who is known as Emperor Ling 漢靈帝 (r. 167-189).