Xue Yuanchao

In 655, he returned to governmental service as Huangmen Shilang (黃門侍郎), the deputy head of the examination bureau of government (門下省, Menxia Sheng), as well as a staff member for Emperor Gaozong's crown prince Li Zhong.

Among the people he recommended were later key officials Ren Xigu (任希古), Gao Zhizhou, Guo Zhengyi, Wang Yifang (王義方), and Meng Lizhen (孟利貞).

Later, though, he was sent out of the capital Chang'an to serve as the prefect of Rao Prefecture (饒州, roughly modern Shangrao, Jiangxi), on account of illness.

Xue made a request that Li be given a horse, and offended the emperor in doing so and was demoted to be the prefect of Jian Prefecture (簡州, roughly modern Ziyang, Sichuan).

Early in Emperor Gaozong's Shangyuan era (674-676), there was a general pardon, and Xue was allowed to return to Chang'an and was made an imperial advisor with the examination bureau.

Emperor Gaozong, impressed with Xue's talent in governance, also made the comment to him, "Given that you are at Zhongshu Sheng, I do not need a large number of people there."

In 681, Xue was made Zhongshu Ling (中書令) —the head of the legislative bureau and a post considered one for a chancellor—as well as a member of Li Xián's staff.

Xue thereafter recommended a number of officials, including the later important officials Zheng Zuxuan (鄭祖玄), Deng Xuanting (鄧玄挺), and Cui Rong (崔融) to be resident scholars at Li Zhe's palace, and he often submitted advice to Li Zhe, counseling him against frequently spending time in hunting.