When Cao Rui was born (likely in 204), his grandfather Cao Cao was the paramount warlord of Han Dynasty, who had rendered Emperor Xian of Han a mere figurehead. His father Cao Pi was Cao Cao's oldest surviving son and the heir apparent. His mother Lady Zhen had been the wife of Yuan Shao's son Yuan Xi, but when she was seized by Cao Cao's army in 204, Cao Pi forced her to marry him, and she gave birth to Cao Rui only eight months after the wedding—leading to theories that Cao Rui was actually biologically Yuan Xi's son and not Cao Pi's. This eventually was used to great advantage by Cao Pi's concubine Guo Nüwang to create tension between Cao Pi and Lady Zhen. Cao Pi, after his father's death in 220, forced Emperor Xian to yield the throne to him and established Cao Wei. Lady Zhen was not allowed to accompany him to the new capital Luoyang, and in 221 he forced her to commit suicide.