Ziyuan Liu was the eighth son of the Southern Song Emperor Liu Jun. He was born to Liu Jun's favorite concubine, Yin Shuyi, and Liu Jun naturally treated him very well. For a child born with a golden key like Ziyuan Liu, he naturally eats well since childhood. Thanks to the special care of Emperor Liu Jun, Ziyuan Liu's childhood went smoothly. When Ziyuan Liu was five years old, he was made King of Xiangyang by Liu Jun and later King of Xin 'an. When Ziyuan Liu was eight years old, the emperor directly made him the prime minister, which should be the youngest prime minister in the history of China.
Although Ziyuan Liu was favored by Song Wudi Liu Jun, he was somewhat learned, but after all, he was an eight-year-old child and could not do the job of prime minister. However, the ministers of the DPRK tried their best to please him, so he was a little drifting. At that time, Liu Jun had many sons, and Ziyuan Liu was only the eighth. It is not his turn to be emperor, but he himself can't help dreaming like this.
In 464 AD, Liu Jun died, but he didn't pass the throne to Ziyuan Liu before his death. Although he wanted to do this very much, it was the way to get rid of chaos since ancient times, so he still failed to break the routine. He made his eldest son Liu emperor, but he didn't handle the relationship between his sons well. After Liu became king, he began to deal with his younger brother, the prime minister.
I hope my answer is helpful to you, thank you!