 In 410, while the Jin capital Jiankang was under attack by the warlord Lu Xun (), Liu Yu had his assistant Liu Cui () accompany the three-year-old Liu Yilong to serve as the defender of Jingkou.In 415, he was created the Duke of Pengcheng.In 417, while Liu Yu was attacking Later Qin, he had Liu Yilong, again assisted by his staff, remain at Pengcheng to serve as the governor of Xu Province (徐州, modern northern Jiangsu and Anhui), to guard his rear.