Liu Jizi was born in 9 BC. His father Liu Xing (劉興) was the youngest son of
Emperor Yuan (r.48-33 BC) and a younger brother of
Emperor Cheng (r.33-7 BC). His mother was one of Prince Xing's consorts, Consort Wei (衛姬). Prince Jizi had three sisters (whose names are not recorded in history) but no brother. He was born with a heart ailment, which, when afflicting him, causes him to have circulation problems, manifesting itself outwardly as having his lips and appendages turn blue. He was raised by his paternal grandmother Consort
Feng Yuan, a
concubine of Emperor Yuan, who then had the title princess dowager in Prince Xing's principality. Around the time of Prince Jizi's birth, Prince Xing was considered a potential imperial heir, because Emperor Cheng had no heirs, but eventually Emperor Cheng chose his nephew (Prince Jizi's cousin)
Liu Xin (劉欣), because Emperor Cheng considered Prince Xin to be more capable than Prince Xing, and also wanted to adopt Prince Xin and make him his own son. When Emperor Cheng died in April 7 BC, Prince Xin took the throne as Emperor Ai. Also in 7 BC, when Prince Jizi was just 2, Prince Xing died, and Prince Jizi inherited his principality as the Prince of
Zhongshan (roughly modern
Baoding, Hebei). He continued to be periodically afflicted with his heart disorder. As a result, his grandmother Princess Dowager Feng hired many physicians and often prayed to the gods. In 6 BC, Emperor Ai, hearing about his cousin's illness, sent imperial physicians along with his attendant Zhang You (張由) to go to Zhongshan to treat Prince Jizi. This, however, would have dire consequences of Princess Dowager Feng. The imperial attendant Zhang was himself afflicted with a psychiatric condition (probably
bipolar disorder), and when he got to Zhongshan, he suddenly, in a rage, left there and returned to the capital
Chang'an. Once he did and was ordered to explain his conduct, he made up a false reason—that he had discovered that Princess Dowager Feng was using witchcraft to curse Emperor Ai and his grandmother,
Empress Dowager Fu. Empress Dowager Fu and Princess Dowager Feng had been romantic rivals when they had been both consorts to Emperor Yuan, and Empress Dowager Fu decided to use this opportunity to strike at Princess Dowager Feng. She sent a eunuch, Shi Li (史立), to serve as investigator, and Shi tortured a good number of Princess Dowager Feng's relationsincluding her sister Feng Xi () and her sister-in-law Junzhi ()some to death, but still could not build a solid case against Princess Dowager Feng. Shi Li decided to show Princess Dowager Feng who was actually behind the investigation, by referring to an incident in which then-Consort Feng defended Emperor Yuan against a bear which had broken loose. Princess Dowager Feng, realizing that Empress Dowager Fu was behind the investigation, went back to her palace and committed suicide. In total, 17 members of the Feng clan died as a result of the investigations. Prince Jizi, then still a toddler, was spared. Princess Dowager Feng's reputation would be restored, and her accusers severely punished, in 1 BC, after the deaths of Emperor Ai and Empress Dowager Fu. In August 1 BC, Emperor Ai died without an heir. His stepgrandmother,
Grand Empress Dowager Wang, quickly seized power back from Emperor Ai's male favorite (and probable lover)
Dong Xian, and recalled her nephew Wang Mang as regent. Wang Mang quickly carried out a wave of retaliation against Dong Xian and Emperor Ai's Fu and Ding (relatives of his mother
Consort Ding) relations, purging them from government. At the same time, he also purged many actual or potential political enemies, while pretending to Grand Empress Dowager Wang to be still loyal to the Han dynasty. Prince Jizi, as the only surviving male descendant of Emperor Yuan (both Emperors Cheng and Ai having died without issue), was considered the logical successor, and he was welcomed to Chang'an to succeed his cousin. == Early reign and Wang Mang's aggrandization of power ==