It is not known when Xue Yiju was born. His family claimed ancestry from Wenxi and original descent from the mythical emperor Zhuanxu. Xue Yiju's traceable ancestry included officials of Han Dynasty, Shu Han, Cao Wei, Jin Dynasty, and Tang Dynasty — including a line of relatively minor officials. Xue Yiju's grandfather Xue Cuncheng served as an imperial attendant, while his father Xue Tingwang served as a prefectural prefect; both were said to have had good reputations.
During Tang Dynasty
Xue Yiju himself was said to be known for elegance and handsomeness. He also associated with other people known for intelligence and elegance, and became known as a writer of some renown. He passed the imperial examinations in the Jinshi class during the Qianfu era of Emperor Xizong of Tang. He thereafter served in a progression of low-level officies in the imperial government — surveyor of budgetary matters, assistant at Jixian Institute, Shiyi, Dianzhong Shiyushi, and Qiju Sheren. He later was made an imperial scholar, along with Libu Yuanwailang, a low-level official at the ministry of rites, and put in charge of drafting imperial edicts. He was later promoted to be Sixun Langzhong, a supervisory official at the ministry of civil service affairs. When Emperor Xizong's brother and successor Emperor Zhaozong fled the imperial capitalChang'an in 895 as he was fearful of an attack by the warlords Li Maozhenthe military governor of Fengxiang Circuit and Wang Xingyu the military governor of Jingnan Circuit, Xue, instead of immediately following the emperor in flight, was gathering up family members and therefore did not catch up with the emperor; for this reason, he was removed from his offices. However, he was shortly recalled to the imperial government to serve as Zhongshu Sheren, a mid-level official at the legislative bureau of government and again became an imperial scholar. He subsequently successively served as the deputy minister of census and of defense, and became chief imperial scholar. When Emperor Zhaozong, at the behest of the chancellor Cui Yin and the powerful warlord Zhu Quanzhong the military governor of Xuanwu Circuit, slaughtered the eunuchs in 903, Xue was found to have painted portraits for some of the slaughtered eunuchs, including Han Quanhui, and therefore was exiled. Early in the Tianyou era, by which time Zhu had forced the imperial government to relocate from Chang'an to Luoyang, an edict was issued commissioning Xue as the deputy minister of civil service affairs, but Xue did not report to Luoyang to take office. Zhu was said to have respected Xue, and therefore had another edict issued making Xue the minister of civil service affairs ; Xue apparently accepted this office. He was subsequently made chief imperial censor. In spring 907, by which time it was becoming clear that Zhu would eventually take over the throne, Emperor Ai sent Xue to Zhu's headquarters at Daliang to greet Zhu. Xue requested to meet Zhu as if he were a subject of Zhu's — i.e., treating Zhu as an emperor. Zhu initially declined, but ascended stairs. Xue then stated: He therefore, pursuant to ceremony due an emperor at the time, danced to show respect to Zhu toward the north. Zhu only turned his body sideways to show slight humility. Once Xue returned to Luoyang, he reported to Emperor Ai that Zhu was ready to accept the throne, so Emperor Ai prepared to yield the throne. Two months later, with a grand procession from Luoyang to Daliang, Xue, along with the chancellors Zhang Wenwei and Yang She, led the ceremony where Zhu accepted the throne, ending Tang and starting Later Liang, with Zhu as its Emperor Taizu. 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.
During Later Liang
Shortly after the dynastic transition, Emperor Taizu made Xue Yiju Zhongshu Shilang and gave him the designation Tong Zhongshu Menxia Pingzhangshi, making him a chancellor. He also served as the director of taxation. In 908, he was made Menxia Shilang, and put in charge of editing the imperial history; he also served as the director of budget. He was later given the additional title of imperial scholar at Hongwen Institute and director of salt and iron monopolies. It was said that during his years as chancellor, however, he had no particular accomplishments. 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. He was given posthumous honors.