Tongcheng () and supported Zhang's son Zhang Yin () as his replacement. Emperor Dezong gave Du the additional post as military governor of Xusihao, gave him the honorary chancellor designation of Tong Zhongshu Menxia Pingzhangshi (), and ordered him to attack Xusihao's capital Xu Prefecture. Du sent his officer Meng Zhun () to attack Xu Prefecture, but Meng was defeated while trying to cross the Huai River. When another attack by Zhang Pi () the prefect of Si Prefecture (泗州, in modern Huai'an, Jiangsu) also failed to capture Xu Prefecture, Emperor Dezong was forced to make Zhang Yin the military prefect (團練使, Tuanlianshi) of Xu Prefecture, but took the other two prefectures of the circuit and merged them into Huainan Circuit, under Du's command. (When one of Zhang Jianfeng's staff members, the future chancellor Li Fan, subsequently fled to Huainan's capital Yang Prefecture, one of Zhang Jianfeng's former subordinates, Du Jian (), falsely accused Li Fan of encouraging Zheng's assassination and the soldiers' support of Zhang Yin. Emperor Dezong, believing Du Jian's accusation, ordered Du You to execute Li, but at Du You's intercession, Li was spared.) In 802, with Du You repeatedly requesting to be replaced, Emperor Dezong made Wang E () Du's replacement and recalled him to Chang'an. After Du arrived in Chang'an in 803, he was made chancellor with the designation of Tong Zhongshu Menxia Pingzhangshi and acting Sikong (司空, one of the Three Excellencies). During Emperor Shunzong's and Emperor Xianzong's reigns When Emperor Dezong died in 805 and was succeeded by his son Emperor Shunzong, Du You served as regent for several days before Emperor Shunzong officially took over the reins of the state. Soon thereafter, Du was again put in charge of the financial matters of the state, with Emperor Shunzong's close associate Wang Shuwen as his deputy — as Wang, who was powerful at the time, believed that it would be more appropriate to serve as deputy to the senior Du. Several months later, however, when Wang Shuwen's mother died and he had to leave official service to observe a mourning period for her, Wang's partisans lost power. Wang's ally Wang Pi made repeated requests to Du for him to intercede to recall Wang Shuwen from his mourning period, but Du was either unwilling or unable to. Soon thereafter, Emperor Shunzong, who was seriously ill, yielded the throne to his son Emperor Xianzong, and