In late 783, Jingyuan soldiers, who had been summoned to Chang'an in anticipation of being sent east to battle warlords Zhu Tao (Zhu Ci's brother), Li Na, Wang Wujun, and Tian Yue, who had declared themselves princes, were at Chang'an, when they were angered by the lack of rewards given by Emperor Dezong. On November 2, 783, they rose in mutiny and, with the imperial guard soldiers inadequate to resist them, Emperor Dezong fled to Fengtian. The Jingyuan soldiers supported Zhu Tao—who had been removed from his command on account of Zhu Tao's rebellion—as their leader. Zhu Tao initially pretended to be interested in calming the situation at Chang'an and then welcome Emperor Dezong back to Chang'an, but was secretly planning on taking over as emperor. He gathered a group of disaffected officials, including the chancellor Li Zhongchen, Zhang Guangsheng (), Yao Xiu (), and Yao Lingyan (), and involved them in his plans. Believing that Duan was similarly disaffected, he sent soldiers to summon Duan as well. Duan initially refused, but was forced by the soldiers to meet Zhu. Once he did, Zhu tried to dissuade him from his plot and to welcome the emperor back to Chang'an. Zhu did not listen to him, but as he admired Duan, tried to continue to deal with Duan cordially. Duan, however, secretly plotted with his subordinates Liu Haibin (), He Mingli (), and Qi Lingyue (), to assassinate Zhu and welcome Emperor Dezong back.