Emperor Xuanzong honored his mother Consort Zheng as
empress dowager. Immediately after taking the throne, Emperor Xuanzong acted against the powerful
chancellor Li Deyu, who had dominated the court during Emperor Wuzong's reign, as he despised Li Deyu for monopolizing power. Emperor Xuanzong removed Li Deyu from his chancellor position and sent him out of the capital
Chang'an to serve as the military governor of Jingnan Circuit (荊南, headquartered in modern
Jingzhou,
Hubei), and also removed Li Deyu's fellow chancellor
Zheng Su. A number of policies that Emperor Wuzong and Li Deyu had pursued, including
persecution against
Buddhism and alliance with the
Yenisei Kirghiz, were reversed. In Li Deyu's place, Emperor Xuanzong installed
Bai Minzhong as the leading chancellor, and over the next few years, Bai recommended a number of other officials, including fellow chancellor
Ma Zhi. Starting in 848, and over a period of several years, Emperor Xuanzong commissioned border troops to recapture various prefectures lost to the Tibetan Empire since the
An Lushan Rebellion, taking the region constituting modern eastern
Gansu, southern
Ningxia, and western
Sichuan. Further, after the ethnic
Han Chinese Zhang Yichao seized control of the
Hexi Corridor from Tibetan officials and submitted to Emperor Xuanzong in 851, Tang had largely reversed the losses to the Tibetan Empire. However, he initially had little success with rebellions by the
Tanguts. After he came to realize that the Tanguts were repeatedly rebelling because of mistreatment by Tang officials, he modified the policies to install officials who were known for mild temper and honesty in the Tangut regions, and he further put Bai in charge of the operations against the Tanguts, giving him a large staff that included many well-known imperial government officials. With Bai overseeing the operations, the Tanguts largely submitted in 851. Bai, however, was not returned to chancellorship within Emperor Xuanzong's lifetime, and was effectively replaced by
Linghu Tao. Emperor Xuanzong was said to govern diligently, paying much attention to how his capable ancestor
Emperor Taizong ruled and trying to follow Emperor Taizong's examples. He also took the time and effort to familiarize himself with imperial officials' capabilities, as well as the customs of the various prefectures throughout the realm, such that he could properly commission officials based on their abilities and review whether they were governing capably. He also encouraged frugality, and tried to demonstrate it by reducing the expenditures for the wedding of his favorite daughter Princess Wanshou to the imperial official Zheng Hao (). It was said that throughout his reign, the imperial clan members and their relatives all carefully obeyed laws. In 848, Emperor Muzong's mother Grand Empress Dowager Guo—whom Empress Dowager Zheng had previously been a servant for—died. Traditional historians noted that popular perception at the time was that Emperor Xuanzong might have murdered her. (It had said that she was depressed over Emperor Xuanzong's disrespect toward her, because Empress Dowager Zheng had resented her, and also because he suspected her and Emperor Muzong of having instigated the death of Emperor Xianzong at the hands of the eunuch Chen Hongzhi ().) Initially, he would refuse to allow Grand Empress Dowager Guo to be buried with Emperor Xianzong or to be enshrined in Emperor Xianzong's temple, but eventually allowed her to be buried with Emperor Xianzong. (He would still refuse to enshrine her, however, with Emperor Xianzong, during his lifetime.) == Late reign ==