died soon after. Liu Yifu succeeded him as Emperor Shao. During Emperor Shao's reign Unlike Xu, Fu, and Xie, however, Tan did not remain at the capital Jiankang or involve himself with the operations of the imperial government, but became the governor of Southern Yan Province (南兗州, modern central Jiangsu). When rival Northern Wei launched a major attack on Liu Song later in 422 in light of Emperor Wu's death, seeking to capture the Liu Song provinces just south of the Yellow River, Tan Daoji commanded an army to try to save those provinces. He was able to save Qing Province (青州, modern central and eastern Shandong), but could not also save Si (司州, central Henan) and Yan (兗州, modern western Shandong) provinces. In 424, Xu, Fu, and Xie, dissatisfied with Emperor Shao's tendencies to trust people lacking virtues and believing him to be unfit to be emperor, resolved to depose him. Because they were apprehensive about the powerful armies that Tan and Wang Hong had, they summoned Tan and Wang to the capital and then informed them of the plot. They then sent soldiers into the palace to arrest Emperor Shao, after first persuading the imperial guards not to resist. Before Emperor Shao could get up from bed in the morning, the soldiers were already in his bedchamber, and he made a futile attempt to resist, but was captured. He was sent back to his old palace. The officials then, in the name of Emperor Shao's mother Empress Dowager Zhang, declared Emperor Shao's faults and demoted him to Prince of Yingyang, offering the throne to his younger brother Liu Yilong the Prince of Yidu instead. Liu Yilong, after some hesitation, took the throne as Emperor Wen. During Emperor Wen's reign Emperor Wen tried to pacify the officials who made him emperor by giving them greater titles and fiefs, and he tried to create Tan the Duke of Wuling (a commandery, as opposed to the county that he was the duke of), but Tan insisted on refusing, and returned to his post at Guangling (廣陵, in modern Yangzhou, Jiangsu). Emperor Wen, angry that Xu, Fu, and Xie had, immediately after they deposed Emperor Shao, assassinated both Emperor Shao and another brother of his, Liu Yizhen () the Prince of Luling, had Xu and Fu arrested and killed in 426, and declared Xie, then the governor of Jing Province (荊州, modern