Family background and ascension
Liu Zhi was born in 132, to Liu Yi (劉翼), the Marquess of Liwu, and his concubine Yan Ming (匽明).
Liu Yi was the son of Liu Kai (劉開) the Prince of Hejian (and therefore a grandson of Emperor Zhang), and he had initially been made the Prince of Pingyuan as the heir of his cousin Liu Sheng (劉勝) by Empress Dowager Deng Sui, the regent for Emperor An, who was impressed with his abilities. That led to rumors that Empress Deng was looking to replace Emperor An, Prince Yi's cousin, with Prince Yi. After Empress Dowager Deng died in 121, Emperor An, bearing a grudge against Prince Yi, demoted him to the rank of Marquess of Duxiang and exiled him to his father's principality. During the reign of Emperor Shun, Prince Kai requested that he be allowed to give Liwu County, part of his principality, to his son, and Emperor Shun permitted it. Marquess Yi thus became the Marquess of Liwu.
By 146, Liu Zhi had inherited his father's title and was betrothed to Liang Nüying, the younger sister of the regent Empress Dowager Liang Na and her violent and corrupt brother, Grand Marshal Liang Ji. That year, Liang Ji, bearing a grudge against the eight-year-old Emperor Zhi for calling him an "arrogant general," murdered the young emperor by poison. The officials largely favored Emperor Zhi's first cousin Liu Suan (劉蒜) the Prince of Qinghe, who was described as a solemn and proper man. Prince Suan's age was not given in history, though he appeared to be an adult by this time. However, Liang Ji was hesitant to yield authority to an able emperor. Because Marquess Zhi was betrothed to his sister and relatively young, Liang Ji felt that he could control him and insisted on making him emperor. Marquess Zhi took the throne later that year as Emperor Huan.