Cao Pi
Cao Cao died in March 220 and his son Cao Pi inherited the title of "King of Wei" without waiting for formal authorization from Emperor Xian. In the winter of 220, Emperor Xian sent the Imperial Seal to Cao Pi and issued an edict announcing that he was abdicating in favour of Cao Pi. Cao Pi formally declined to accept the throne thrice but obliged eventually. The Han dynasty officially ended at that point and Cao Pi established the state of Cao Wei in its place, moving the capital from Xu back to Luoyang. The dethroned Emperor Xian was granted the title of "Duke of Shanyang".