In 508, Princess Li was again pregnant and due to give birth, when Emperor Xuanwu, believing in false accusations of his maternal uncle Gao Zhao that Yuan Xie was plotting rebellion, forced Yuan Xie to commit suicide. Princess Li soon gave birth to Yuan Ziyou's younger brother, Yuan Zizheng (). It appeared that Yuan Ziyou was close to his brothers. Yuan Shao, as the oldest son of Yuan Xie's wife, inherited Yuan Xie's title of Prince of Pengcheng. Yuan Ziyou and his brothers Yuan Zizhi and Yuan Zizheng were created dukes—in Yuan Ziyou's case, the Duke of Wucheng. Yuan Ziyou, in his youth, served as an attendant to Emperor Xuanwu, and was praised for his intelligence and handsome looks. He held increasingly higher offices during the reigns of Emperor Xuanwu and his son and successor Emperor Xiaoming.