Xue was born during the Later Liang, the first of the Five Dynasties. He received his Jinshi examination degree during the Later Tang. He continued to serve the remaining three dynasties of the Five Dynasties, the , Later Han, and the Later Zhou.
When the Song Dynasty replaced the Later Zhou in 960, Xue took service with the new dynasty as he had with dynasties prior to the new rulers of northern China. During the first two decades of the Song, Xue set about to compiling a history of the Five Dynasties.
Entitled ''Five Dynasties History'', the main purpose of the work was to reinforce the claim of the Song to the Mandate of Heaven from the Tang Dynasty through the Five Dynasties to the reigning Song.
Death and legacy
Xue did not live much longer than after compilation of the ''Five Dynasties History'' in 974, dying in 981. However, his legacy of writing a history of a previous era of Chinese history for the purpose of bolstering the current patron dynasty would be repreated later in Chinese history, notably with the Yuan Dynasty’s writing of the ''History of Liao''.