Emperor Wen of Han (Chinese: 漢文帝; 203/02 – 6 July 157 BC), personal name Liu Heng (劉恆), was the fifth emperor of the Han dynasty from 180 until his death in 157 BC. The son of Emperor Gao and Consort Bo, his reign provided a much needed stability within the ruling Liu clan after the unstable and violent regency of Empress Lü, who went after numerous members of the clan. The prosperous reigns of Emperor Wen and his son Emperor Jing are highly regarded by historians, being referred to as the Rule of Wen and Jing. He was one only four Western Han emperors to receive a temple name, along with Emperor Gaozu, Emperor Wu, and Emperor Xuan of Han.
When Emperor Gaozu suppressed the rebellion of Dai (代), he made Liu Heng Prince of Dai. Since Emperor Gaozu's death, power had been in the hands of his wife, Empress Lü, the empress dowager. After Empress Lü's death, the officials eliminated the powerful Lü clan, and deliberately chose the Prince of Dai as the emperor, since his mother, Consort Bo, had no powerful relatives, and her family was known for its humility and thoughtfulness.