Sima Yan was born to Sima Zhao and his wife Wang Yuanji, daughter of the Confucian scholar Wang Su, in 236, as their oldest son. At that time, Sima Zhao was a mid-level official in the government of Cao Wei and a member of a privileged clan, as the son of the general Sima Yi. After Sima Yi seized power from the regent Cao Shuang in 249 in the Incident at Gaoping Tombs, Sima Zhao became more influential in the state. After his father's death in 251, Sima Zhao became the assistant to his brother, the new regent Sima Shi. After Sima Shi died in 255, Sima Zhao became regent and the paramount authority in the Wei government.