His family claimed ancestry from Wenxi (聞喜, in modern Yuncheng, Shanxi)[3] and original descent from the mythical emperor Zhuanxu.
He passed the imperial examinations in the Jinshi class during the Qianfu era (874–879) of Emperor Xizong of Tang.
[3] When Emperor Zhaozong, at the behest of the chancellor Cui Yin and the powerful warlord Zhu Quanzhong the military governor of Xuanwu Circuit (宣武, headquartered in modern Kaifeng, Henan), slaughtered the eunuchs in 903,[6] Xue was found to have painted portraits for some of the slaughtered eunuchs, including Han Quanhui, and therefore was exiled.
How can I dare to disobey these directives?He, therefore, pursuant to ceremony due an emperor at the time, danced to show respect to Zhu toward the north.
It was said that when Emperor Taizu held a feast for the Tang officials who participated in the ceremony, most Tang officials were humiliated and did not speak, but Xue, Su Xun (蘇循), and Zhang Yi (張禕) spoke in praising the new emperor for his accomplishments.
He was later given the additional title of imperial scholar at Hongwen Institute (弘文館) and director of salt and iron monopolies.
[3] In 912, after accompanying Emperor Taizu on a campaign against Later Liang's rival state Jin, he fell ill, and died shortly after returning to Luoyang.