In 401, Sima Yuanxian, apprehensive of Huan Xuan (who had by then defeated and executed Yin and Yang, taking over the entire western empire), declared Huan a renegade and launched a campaign against him. However, he relied on Liu's troops, and Liu, not trusting his good intentions, again turned sides and joined Huan, and in 402 the capital Jiankang fell to Huan's forces. Sima Yuanxian was captured and executed, while Sima Daozi was exiled to Ancheng (安成, in modern Ji'an, Jiangxi). Around the new year 403, an official sent by Huan Xuan, pursuant to Huan Xuan's instructions, poisoned Sima Daozi to death.