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 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.