Liu Yu was born in 463, when his father Liu Yu (different character) was the Prince of Xiangdong under his uncle Emperor Xiaowu. He was the oldest son of the Prince of Xiangdong, and his mother was the concubine Chen Miaodeng. (The Prince of Xiangdong had earlier disfavored Lady Chen and given her to his attendant Li Dao'er () and then taken her back, and therefore there was constant rumor that his son's biological father was actually Li, not he.) His courtesy name of Huizhen came from the "I Ching", which the Prince of Xiangdong used extensively for divination.