Emperor Xian of Han
Cao Cao died on 15 March 220. His son and successor, Cao Pi, soon forced Emperor Xian to abdicate the throne in favour of himself, ending the Han dynasty. Cao Pi established a new state known as Cao Wei (sometimes known inaccurately as the Kingdom of Wei), and he granted Emperor Xian a noble title – Duke of Shanyang (山陽公). The former Emperor Xian died in 234 and was buried with honours befitting an emperor, using Han ceremonies, and the then emperor of Wei, Cao Rui, was one of the mourners. As Emperor Xian's crown prince was already dead, his grandson Liu Kang (劉康) inherited his dukedom, which lasted for 75 more years and two more dukes, Liu Jin (劉瑾) and Liu Qiu (劉秋), until the line was exterminated by invading Xiongnu tribes in about 309, during the Jin dynasty. This practice of an emperor conferring hereditary nobility on his predecessor, from whom he usurped the throne, was known as "er wang san ke" (二王三恪).
Military history of the Three Kingdoms
On 11 December, 220, Cao Pi deposed the last Han emperor and proclaimed himself Emperor of Cao Wei. During his reign Cao Pi alienated his brothers Cao Zhang and Cao Zhi. Cao Pi deeply distrusted his close kin and reduced their powers out of suspicion of their loyalty. Cao Pi died in 226 and was succeeded by his son Cao Rui. Although Cao Rui was twenty years old, he was nonetheless appointed a regency council by his father prior to his death. By 236, three members of the regency council had died, leaving Sima Yi as the primary leader of Cao Wei. Shu Han continued to press the Wei borders and in 233, Zhuge Liang occupied Wudu Commandery. He was checked there by Sima Yi and died the following year. In 238 Sima Yi annexed the Gongsun state in the northwest. This was followed by a campaign into Goguryeo in 244 and 245. Cao Rui died in 239 and was succeeded by his adopted son Cao Fang, who fell under the regency of Cao Shuang and Sima Yi.