At a later point, he was made a secretary in charge of military matters at Yi Prefecture (益州, roughly modern Chengdu).
(錄事意, 與天通, 益州司馬折威風, Lushi yi, yu tian tong, Yizhou sima zhe weifeng.)
During Wu Zetian's Tianshou era (690-691), he was serving with such individuals as Xu Yougong (徐有功), Lai Junchen, and Hou Sizhi.
On an occasion, Wu Zetian, who favored signs of fortune, showed a pear flower in the winter.
Eventually, Du was recalled to the capital to serve as the chief judge of the supreme court (司刑卿, Sixing Qing).
This was opposed by the official Wang Qiuli (王求禮) and Du, who pointed out that these people were forced into surrendering to save their lives.
While serving at that post, he was accused of revealing palace secrets and first made the deputy chief judge of the supreme court (司刑少卿, Sixing Shaoqing) and then the secretary general at Bing Prefecture (并州, roughly modern Taiyuan, Shanxi).