List of emperors of the Han dynasty
The Han dynasty was founded by the peasant rebel leader (Liu Bang), known posthumously as Emperor Gao ("r". 202 –195 BC) or Gaodi. The longest reigning emperor of the dynasty was Emperor Wu ("r". 141–87 BC), or Wudi, who reigned for 54 years. The dynasty was briefly interrupted by the Xin dynasty of the former regent Wang Mang, but he was overthrown in 23 AD and the Han dynasty was reestablished by Liu Xiu, known posthumously as Emperor Guangwu (r. 25–57 AD), or Guangwu Di. The last Han emperor, Emperor Xian ("r". 189–220 AD), was a puppet monarch of Chancellor Cao Cao (155–220 AD), who dominated the court and was made King of Wei. In 220 AD, Cao's son Pi usurped the throne as Emperor Wen of Wei ("r". 220–226 AD) and ended the Han dynasty.
End of the Han dynasty
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 a title of "Duke of Shanyang".