As the emperor's only surviving brother, Sima Daozi was in an honored position. In 380, when he was just 16, he was offered the position of prime minister, but he declined. In 383, he finally accepted the title while the empire was preparing for a showdown with the powerful rival Former Qin, and, after Jin forces repelled Former Qin forces at the Battle of Fei River, thus guaranteeing the dynasty's continued survival, he soon came into a power conflict with Xie An, who had served as Emperor Xiaowu's regent ever since Emperor Xiaowu's ascension; this conflict was aggravated by Xie An's son-in-law Wang Guobao (王國寶), whose cousin was Sima Daozi's wife and whom Xie disfavored, who therefore retaliated by slandering Xie before Emperor Xiaowu and Sima Daozi. Emperor Xiaowu therefore began to listen to Xie less, and in 385, Xie volunteered to lead an army and leave the capital to avoid further conflict with Sima Daozi. When Xie died later that year, Sima Daozi became the head of the government under Emperor Xiaowu, who entrusted his brother with most important affairs of state.