Xu to Chen. In 562, Emperor Wen, who had remotely created Chen Xu the Prince of Ancheng, traded the city of Lushan (魯山, in modern Wuhan, Hubei) to Northern Zhou in exchange for Chen Xu's return. Initially, Chen Shubao and his mother Princess Liu were not returned, but after further negotiations by Emperor Wen, were returned. Chen Shubao was designated as Chen Xu's successor. He held minor offices during Emperor Wen's reign. In 566, Emperor Wen died and was succeeded by his son, Crown Prince Chen Bozong, as Emperor Fei. The high-level officials that Emperor Wen left in charge, including Chen Xu, eventually became locked in a power struggle, and in 567, Chen Xu killed Liu Shizhi () and Dao Zhongju () and seized control. In winter 568, he had an edict issued in the name of Emperor Wu's wife Grand Empress Dowager Zhang Yao'er that deposed Emperor Fei and he took the throne as Emperor Xuan in spring 569. Chen Shubao was made crown prince, and his mother, Princess Liu, was made empress. As crown prince In fall 569, Chen Shubao married Shen Wuhua, the daughter of the official Shen Junli (), as his wife and crown princess. However, eventually he came to favor his concubine, Zhang Lihua. As crown prince, Chen Shubao was known for his love of literature and feasting. He thus wanted to command the official Jiang Zong (), who was talented in literature, serve as his chief of staff, and he requested that Kong Huan (), the minister of civil service, to make it so. Kong declined, citing that Jiang, while talented, lacked steadiness and would not be able to correct Chen Shubao. Chen Shubao then personally made the request to his father Emperor Xuan, and Emperor Xuan, while he hesitated due to Kong's opposition, eventually agreed. Eventually, however, because Jiang and Chen Shubao overly feasted, including instances where Chen Shubao wore civilian clothing to sneak out of the palace to visit Jiang's mansion, Emperor Xuan removed Jiang from his post. In spring 582, Emperor Xuan grew ill, and Chen Shubao, along with his brothers Chen Shuling () the Prince of Shixing, and Chen Shujian () the Prince of Changsha, attended Emperor Xuan at the palace. The ambitious Chen Shuling had designed on the throne, and when Emperor Xuan died, while Chen Shubao was mourning over Emperor Xuan's casket, Chen Shuling pulled out a sharpened