In 216, after Emperor Xian promoted Cao Cao from a duke to a vassal king under the title "King of Wei", Sima Yi became an adviser to Cao Cao's son and heir apparent, Cao Pi. Cao Pi highly regarded and respected Sima Yi for his brilliance. Along with Chen Qun, Wu Zhi, and Zhu Shuo (), Sima Yi was one of Cao Pi's close aides and one of his "Four Friends". Before Cao Pi became his father's heir apparent in 216, he engaged in a power struggle against his younger brother Cao Zhi over the succession. During this time, Sima Yi was believed to be among those who secretly backed Cao Pi and helped him win the position of heir apparent. He also allegedly had a hand in Cao Zhi's demotion and removal from politics after Cao Pi became the emperor.