He returned to Ye (鄴; in present-day Handan, Hebei) in 237, but was summoned back to the Wei capital Luoyang in the summer of 238.
After serving as General-in-Chief for a few days, Cao Yu had the intention of resigning.
Cao Yu remained as the Prince of Yan when his son was a nominal emperor under Sima Zhao's control.
[7] On 4 February 266, Sima Zhao's son Sima Yan forced Cao Huan to abdicate the throne in his favour, ending the state of Cao Wei and establishing the Jin dynasty.
Sima Yan became the emperor and he granted Cao Huan the title "Prince of Chenliu" (陳留王).