In 265, Cao Huan abdicated in favor of Sima Yan, then of , and Sima created him the Prince of Chenliu , a title he carried until death and the title he is known for in the ''Records of the Three Kingdoms''. After his death, he was buried with honors due an emperor and given a posthumous imperial name.
Family background and ascension to the throne
The future emperor was born as Cao Huang in 246. His father Cao Yu was the Prince of Yan and one of the youngest sons of Cao Cao, the father of Cao Wei's first emperor, Cao Pi , who was considered as regent for the emperor Cao Fang by Cao Fang's father, Cao Rui , in 238. In 258, at age twelve, in accordance with Cao Wei's regulations that the sons of princes were to be created dukes, he was created the Duke of Changdaoxiang .
In 260, after then-emperor Cao Mao was killed in a failed attempt to take power back from Sima Zhao, for reasons unknown, Sima decided to make Cao Huang emperor, even though Cao Pi still had living male issue.
At the time Cao Huang became emperor, his name was changed to "Cao Huan", because it was difficult to observe naming taboo with the name "Huang" . During Cao Huan's reign, the Simas had actual power of the regime, and he was even more of a figurehead than his predecessors Cao Fang and Cao Mao. In 263, he created his wife empress.
For the first few years of Cao Huan's reign, there were constant attacks by Shu Han's commander of armed forces, Jiang Wei. While Jiang's attacks were largely easily repelled, Sima was sufficiently annoyed that he planned a major counterattack, with the goal to destroy Shu Han once and for all. In 263, Sima launched the attack, with 180,000 men commanded by Zhong Hui and Deng Ai. Initially, the attack was stalled, until Deng Ai bypassed Shu Han's main forces, led by Jiang, by going deep through treacherous mountain routes and defeating and killing Zhuge Zhan in battle. Once that happened, Jiang was trapped between the two main Cao Wei forces and could not react, and Deng proceeded to the Shu Han capital Chengdu, forcing Shu Han's emperor Liu Shan to surrender.
After the destruction of Shu Han, Deng became arrogant, and Zhong, who had grander ambitions, used Deng's arrogance against him by falsely accusing him of treason and forging letters to and from Deng to show such alleged treason. Sima ordered Zhong to arrest Deng and seize Deng's troops -- which was exactly what Zhong hoped for. Jiang, who had then surrendered to Zhong, wanted to use this chance to try to revive Shu Han, and he encouraged Zhong to declare a rebellion in early 264. Jiang tried to persuade Zhong to execute all of the Cao Wei generals, as they might oppose him. Zhong hesitated, and as he did, the generals started a counterinsurgency and killed him and Jiang. In the confused aftermaths, Deng was also killed. Shu Han's former territory was incorporated into Cao Wei.
Abdication and later life
Cao Wei itself did not last much longer, however. In 263, Sima again forced Cao Huan to grant him the nine bestowments and this time finally accepted, signifying that an usurpation was near. In 264, he was promoted to the Prince of Jin -- the final step before usurpation. After he died in 265, his son Sima Yan inherited his position, and later that year forced Cao Huan to abdicate in favor of him, establishing the . He created Cao Huan the Prince of Chengliu, the title that Cao Huan would carry for the rest of his life.
Not much is known about Cao Huan's life as a prince under Jin rule. Sima Yan permitted Cao Huan to retain imperial banners and wagons and to worship ancestors with imperial ceremonies. He also permitted Cao Huan not to refer to himself as a subject of his. He died in 303, during the reign of Sima Yan's son Emperor Hui of Jin. He was buried with honors due an emperor and given an imperial posthumous name.
** Cao Yu , the Prince of Yan, son of Cao Cao