Wu Zetian promoted Tang Xiujing to be a commanding general of two of the imperial armies and kept him at the central government. It was said at the time that Tang was familiar with border affairs, as far east as Jieshi (碣石, in modern Qinhuangdao, Hebei) to the four garrisons of Anxi, knowing about all of the geographic features and defensive frameworks. As of 703, Tang Xiujing was serving as the minister of defense (夏官尚書, "Xiaguan Shangshu") and still in titular command of the armies around Liang Prefecture, when he was given the designation "Tong Fengge Luantai Sanpin" (), making him a chancellor "de facto". At that time, one of Western Tujue's constituent tribal chiefs, Wuzhile () the chief of the Tuqishi () tribe, was having conflicts with other Western Tujue tribes, and as a consequence the communications with the Zhou garrisons in Anxi was cut off. Tang, after discussion with other chancellors, came up with a course of action and predicted what would happen next. When reports from Anxi arrived some 10 days later, they matched what Tang expected, and Wu Zetian stated, "I regret not using you earlier." She further turned to the other chancellors Wei Yuanzhong, Yang Zaisi, Li Jiao, Yao Yuanchong, and Li Jiongxiu, stating, "Tang Xiujing understands the border affairs well, and in this area, 10 of you together cannot match him." She also made him a member of the staff of Li Xian the Crown Prince (the former Emperor Zhongzong, who had been recalled from exile in 698 and made crown prince, further having his name changed). In 704, in response to the problem that imperial officials were not willing to be local officials, Tang and Li Jiao suggested that the officials at the central government be assigned to the prefectures and counties to serve as officials, offering to go first themselves. Wu Zetian had 20 officials randomly drawn, and neither Li nor Tang was sent out. Later that year, when fellow chancellor Wei Anshi submitted an indictment against Wu Zetian's lovers Zhang Yizhi and Zhang Changzong, Wu Zetian had Wei and Tang investigate, but before investigations could be complete, there were reports that Khitan and Xi were set to attack the northeastern border, and she gave Tang the additional titles as the commandant of You and Ying Prefectures (headquartered in modern Beijing) and protectorate general of Andong to defend against Khitan and Xi.