Emperor Ping (9 BC – February 3, AD 6) was an emperor of the Chinese Han Dynasty from 1 BC to AD 5. After Emperor Ai died childless, the throne was passed to his cousin Emperor Ping—then a child of nine years old. Wang Mang was appointed regent by the Grand Empress Dowager Wang. Dissatisfied with his father's dictatorial regency, in AD 3, Wang's son Wang Yu (王宇) conspired with Emperor Ping's maternal uncles of the Wei clan against Wang, but after they were discovered, Wang had not only Wang Yu and the Weis (except Consort Wei) put to death, but also used this opportunity to accuse many actual or potential political enemies as being part of the conspiracy and to execute or exile them. From here onwards, the Han Dynasty existed only in name. Furthermore, Wang Mang also designated his daughter as the empress consort to Emperor Ping to codify his legitimacy to power. Emperor Ping was allegedly poisoned by Wang Mang after reigning less than six years, because Wang was concerned that he would avenge his uncles, and his successor, the toddler Emperor Ruzi, would be chosen by none other than Wang Mang himself.
Then-Liu Jizi was born in 9 BC. His father Liu Xing (劉興) was the youngest son of Emperor Yuan and the younger brother of Emperor Cheng. 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 affliciting 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 7 BC, Prince Xin took the throne as Emperor Ai.