Xu Jingzong (592 – September 20, 672), courtesy name Yanzu, posthumously known as Duke Gong of Gaoyang, was a Chinese cartographer, historian, and politician who served as a chancellor in the Tang dynasty. Allied with Emperor Gaozong's powerful wife, Empress Wu (later known as Wu Zetian), Xu Jingzong was exceedingly powerful and effective throughout most of Gaozong's reign. By order of Empress Wu, he played a major role in the elimination of the chancellors opposed to her, in 657–659 and again in 665.

Early life Xu Jingzong was born in 592, during the reign of Emperor Wen in the Sui dynasty. His ancestors had served as officials of the Southern dynasties during the Southern and Northern dynasties period for generations and claimed to be originally from Gaoyang Commandery (, roughly modern Baoding, Hebei), before moving south of the Yangtze River in light of the Jin dynasty's loss of the north. Xu Jingzong's father, Xu Shanxin (), was serving as an emissary of Chen Shubao, the last emperor of the Chen dynasty, to Emperor Wen, whose Sui dynasty then ruled the north, in 589, when Sui destroyed Chen to end the Southern and Northern dynasties period and reunify China. Emperor Wen was impressed with Xu Shanxin's profound sadness (rather than abject submission) at the fall of his state, and made him an official in his own administration.

During the Sui dynasty Xu Jingzong himself was said to be knowledgeable in literature in his youth, and, after passing the imperial examination, was made a scribe at Huaiyang Commandery (, roughly modern Zhoukou, Henan). He was soon made a low level official in the imperial administration of Emperor Wen's son, Emperor Yang. In 618, with virtually the entire Sui state engulfed by agrarian rebellions against Emperor Yang's rule, Xu Shanxin and Xu Jingzong were at Jiangdu (in modern Yangzhou, Jiangsu) with Emperor Yang and his other officials, when Emperor Yang was killed in a coup led by the general Yuwen Huaji. Yuwen was initially planning to spare Xu Shanxin, but after Xu Shanxin publicly refused to submit to him by dancing in his presence (then considered a sign of thanksgiving and submission), Yuwen executed him. Xu Jingzong submitted to Yuwen (by dancing) and was spared. His exact travels after Emperor Yang's death were not clear, although it is known that he later served the rebel ruler Li Mi, the Duke of Wei, as a secretary (along with the future Tang chancellor Wei Zheng), before eventually becoming a subject of the Tang dynasty, which emerged victorious from the civil wars near and after the end of Sui. (Sui's last emperor, Emperor Yang's grandson, Yang Tong, posthumously honored Xu Shanxin by posthumously making him the Duke of Gaoyang — a title that Xu Jingzong would eventually receive from Tang.)

During Emperor Gaozu's reign It is not clear what Xu Jingzong's activities were initially after becoming a subject of the Tang dynasty under the reign of Emperor Gaozu, but it is known that in 621, by which time Tang had prevailed over most, but not all, of its rivals in its campaign to reunify China after Sui's collapse, Xu was set to be sent to Lian Prefecture (, roughly modern Huai'an, Jiangsu) to serve as its prefect's chief advisor, when Emperor Gaozu's son, Li Shimin (the Prince of Qin), hearing of his talent, kept him in the capital to serve as a member of his staff at a mansion where he retained the best literary talent and served them with the best food and wine. Xu also carried the title of census officer of Songzhou during this time, but appeared to not report to Songzhou at all.

During Emperor Taizong's reign In 634, eight years after Li Shimin had succeeded Emperor Gaozu as emperor (as Emperor Taizong), Xu Jingzong was made an imperial scholar responsible for editing imperial history, as well as a mid-level official at the legislative bureau of government (, Zhongshu Sheng). In 636, after Emperor Taizong's wife, Empress Zhangsun, died, the officials were observing a period of mourning and rotating in watching her casket, when Xu, seeing that the official taking that particular shift, Ouyang Xun, was exceedingly ugly in appearance, burst out in laughter, and was accused by the imperial censor for disrespect. He was demoted to the post of military assistant of the commandant at Hong Prefecture (, roughly modern Nanchang, Jiangxi). Eventually, he was recalled to the capital to be in charge of imperial supplies, and continued to also serve in the role of editing imperial histories. In 643, he assisted the chancellor Fang Xuanling in editing and then submitting imperial histories for Emperors Gaozu's and Taizong's reigns and, for his contribution to the project, was created the Baron of Gaoyang, given an award of silk, and promoted to be the acting deputy head of the examination bureau of government (, Menxia Sheng). He was also soon made a junior advisor to Emperor Taizong's crown prince, Li Zhi.

In 645, Emperor Taizong was on the campaign against Goguryeo when the chancellor Cen Wenben, who was in charge of the legislative bureau and writing his edicts, died suddenly. Emperor Taizong had left Li Zhi at Ding Prefecture (, roughly modern Baoding, Hebei), to be in charge of logistics, assisted by a number of officials led by the chancellor Gao Shilian, and Xu was a member of Li Zhi's staff there.The New Book of Tang indicated that Xu was made a de facto chancellor at this point. See New Book of Tang, vol. 61. However, this, if true, appeared to be no longer the case after the end of the Goguryeo campaign, and could have been simply a temporary measure during the Goguryeo campaign, as he was not referred to as chancellor again until 657 when he was made the head of the examination bureau. After Cen's sudden death, Emperor Taizong summoned Xu to the front and put him in charge of writing the edicts, and made him acting deputy head of the legislative bureau. After Emperor Taizong had a major victory over the main Goguryeo forces, he had Xu draft an edict announcing the victory, and he praised Xu for the beauty of the language that Xu used. (Despite the victory, however, Emperor Taizong's campaign would eventually end in failure, as he was unable to capture Anshi (, in modern Anshan, Liaoning) against the fierce defenses by the Goguryeo general later known in Korean popular stories as Yang Manch'un.) Later, at Xu's suggestion, staff members of Li Zhi's elder brother and predecessor as crown prince, Li Chengqian (who was deposed in 643 in light of discoveries that he had plotted to overthrow his father), who had been long banned from civil service, had their eligibility restored.

During Emperor Gaozong's reign In 649, Emperor Taizong died, and Li Zhi succeeded him (as Emperor Gaozong). As part of the reshuffling of the imperial government, the minister of ceremonies, Yu Zhining was made chancellor, and Xu took over Yu's post as minister of ceremonies. Around this time, however, he was accused of improperly accepting an excessive amount of bride price to give his daughter in marriage to a son of Feng Ang (), a powerful regional official and chieftain of the local people in modern Guangdong, and, for this perceived impropriety, was demoted to the post of prefect of Zheng Prefecture (roughly modern Zhengzhou, Henan). In 652, he was recalled to the capital to serve as the minister of armory supplies, and in 655, was restored to his old post of minister of ceremonies.

Meanwhile, Emperor Gaozong's wife, Empress Wang, had lost her favor with the emperor, who now favored Consort Wu, and he wanted to depose Empress Wang and replace her with Consort Wu. The chancellors—except Li Ji—were all opposed, with the harshest opposition coming from Chu Suiliang, Han Yuan, and Lai Ji. Xu became an ally of Consort Wu, along with the other officials Li Yifu, Cui Yixuan (), and Yuan Gongyu (). Xu tried to get the most powerful of the chancellors, Emperor Gaozong's maternal uncle Zhangsun Wuji, to join their party as well, but Zhangsun, while not outwardly opposing Consort Wu's ascension, repeatedly showed implicit disapproval and refused to join Consort Wu's cause. He further repeatedly rebuked Xu, drawing Xu's resentment. Later in 655, despite severe opposition from Chu, Han, and Lai, Emperor Gaozong deposed Empress Wang and her ally Consort Xiao and replaced Empress Wang with Consort Wu. During the controversial change of empresses, Xu publicly endorsed the move, stating that even a common peasant would consider changing his wife if he harvested an extra ten hu of wheat. If the Son of Heaven wished to appoint an empress, it was no one else's business.(许敬宗宣言于朝曰︰“田舍翁多收十斛麦,尚欲易妇;况天子欲立后,何豫诸人事而妄生异议乎!”) Zizhi Tongjian, vol.199 It was partly due to Xu's words that Emperor Gaozong's resolve was hardened, and he further demoted Chu out of the capital. In addition, once Empress Wang was deposed, Xu submitted a petition to have honors posthumously given to her father, Wang Renyou (), rescinded.

In late 655, Xu also proposed that the crown prince, Li Zhong (born of Consort Liu, who was of low birth, and therefore proposed as crown prince by Empress Wang (who was herself sonless) in 652 as she hoped that he would be grateful), be deposed and replaced with Empress Wu's eldest son, Li Hong. In 656, Emperor Gaozong agreed and demoted Li Zhong to the title of Prince of Liang, creating Li Hong crown prince instead.

In 657, following Empress Wu's directions, Xu and Li Yifu accused Han and Lai (who were still chancellors at this point but had basically lost power) of conspiring with Chu to rebel. Han, Lai, and Chu were all made prefects of distant prefectures and ordered to be permanently banished from the capital. Later that year, Xu was made Shizhong (): the head of the examination bureau and a post considered one for a chancellor. In 658, he was made Zhongshu Ling (), the head of the legislative bureau and also a post considered for a chancellor; he was also promoted to the greater title of Duke of Gaoyang.

By 659, Empress Wu, with her own great powers-base, began to seek further vengeance against those she felt had slighted her, and her prime target was Zhangsun and Yu. At that time, a man named Li Fengjie () had accused the low level officials Wei Jifang () and Li Chao () of conspiracy, and Emperor Gaozong put Xu and Xin Maojiang in charge of the investigations. Xu used various interrogation tactics, including torture, to cause Zhangsun to be implicated, and Xu, citing the example of Yuwen Huaji, informed Emperor Gaozong that Zhangsun was about to rebel and should be immediately expelled from the capital. Emperor Gaozong, after some hesitation, agreed without once meeting with Zhangsun to get his side of the story, exiling him to Qian Prefecture (, roughly modern southeastern Chongqing). Xu then implicated Chu (who had died earlier, in 658), Han, Lai, and Yu in the alleged plot as well. Chu's posts were posthumously removed, and Han, Lai, and Yu were removed from their posts. Chu's sons Chu Yanfu () and Chu Yanchong () were killed on their way to exile. Several of Zhangsun's relatives were also exiled. Later that year, Xu revised the rankings of various clans, promoting Empress Wu's Wu clan to the highest rank. In fall 659, Emperor Gaozong further ordered Li Ji, Xu, Xing, Ren Yaxiang, and Lu Chengqing to investigate Zhangsun's plot again. Xu, in response, sent Yuan to Qian Prefecture to force Zhangsun to commit suicide. Also apparently at Xu's suggestion, Emperor Gaozong ordered the executions of Han and Empress Wang's maternal uncle, Liu Shi (who had also been exiled).