Overview
Cao Fang (232–274), courtesy name Lanqing, was the third emperor of the state of Cao Wei during the Three Kingdoms period. He was an adopted son of Cao Rui, the second ruler of Wei. Cao Fang ruled from January 239 to October 254 as a nominal emperor before he was deposed by the regent Sima Shi, after which he became known as the "Prince of Qi". After the fall of Wei in February 266, Cao Fang was conferred the title of "Duke of Shaoling" by Emperor Wu of the Jin dynasty. When he died in 274, he was granted the posthumous name "Li", so his full posthumous title became "Duke Li of Shaoling".
Background
Cao Fang's parentage is disputed, though he was probably a son of Cao Kai, the Prince of Rencheng, a son of Cao Zhang. He was adopted by Wei's second emperor Cao Rui at a young age. He was instated as the Prince of Qi in 235.
Around 239, when Cao Rui became ill, he resolved to pass the throne to Cao Fang. Initially, he wanted to entrust Cao Fang to his uncle Cao Yu (曹宇), who would serve as a regent along with Xiahou Xian (夏侯獻), Cao Shuang, Cao Zhao (曹肇), and Qin Lang (秦朗). However, Cao Rui's trusted officials Liu Fang (劉放) and Sun Zi (孫資) were not on good terms with Xiahou Xian and Cao Zhao, and were apprehensive about them becoming regents. Eventually, Cao Rui was persuaded to appoint Cao Shuang and Sima Yi. Cao Yu, Cao Zhao and Qin Lang were excluded from the regency.
Half a month later, when Cao Rui was on his deathbed, Sima Yi arrived at Luoyang. Cao Rui held onto Sima's hand and summoned Cao Fang and Cao Xun (another adopted son of Cao Rui) to his bedside. He pointed out Cao Fang and told the boy to hug Sima, as he would hug his father. Cao Rui then instated Cao Fang as crown prince and died on the same day.
From Wikipedia (CC BY-SA 4.0).