Lu Wenji was born in 876, during the reign of Emperor Xizong of Tang. He was from Tang Dynasty's capital Chang'an. His grandfather Lu Jianqiu served as a military governor, while his father Lu Siye served as You Bujue, a low-level consultant at the legislative bureau of government.
In 926, during the reign of Li Siyuan, the second emperor of the succeeding Later Tang, Lu Wenji was commissioned as the deputy chief imperial censor. . At that time, the customs were that the other officials would go the office of the imperial censors to congratulate the new deputy chief. The circuits' liaison officers at the capital were expected to go, present their name cards to the clerks of the deputy chief, and receive tea and wine from the deputy chief to thank them for coming, without actually meeting with the deputy chief. Lu's staff members, however, informed him that the previous Tang regulations were that the liaison officers were to actually meet with and bow to the deputy chief to congratulate him. Lu, wanting to emulate proper Tang customs, had the clerks escort the liaison officers into the hall, where Lu was seated, and bow to him. The liaison officers felt humiliated, and they complained to Li Siyuan's chief of staffAn Chonghui. An pointed out that he himself was unfamiliar with Tang regulations, and referred them directly to the emperor. When they went to complain to Li Siyuan, Li Siyuan, after consulting with the chancellor Zhao Feng, who pointed out that these liaison officers were merely low-level officers at their circuits entrusted to deliver messages, stated in anger, "These are just functionaries and soldiers. How dare they disrespect my judicial official!" He had them caned and ejected. At Lu's request, Li Siyuan also issued an edict reinstating the Tang regulations for performance review for officials — which also included self-evaluations for generals, chancellors, and the emperor himself. However, the edict was not actually implemented. After about a year, Lu was made the minister of public works. Thereafter, the chancellor Cui Xie, with whom Lu had a contentious relationship, made the official Yu Ye the deputy minister of public works. Lu was angered, because Yu Ye's name coincided with that of his own father Lu Siye. When Yu reported to the ministry of public works and tried to meet with him to greet him, Lu refused to receive him, and avoided meeting him by repeatedly taking off days. Thereafter, there was an occasion when Yu was sent by Li Siyuan to be an emissary to Zhangwu Circuit ; even before Yu departed then-capital Luoyang, however, Lu resumed his duties. Yu, in anger at this disrespect, committed suicide by hanging after he fell drunk. When this incident became known, Li Siyuan exiled Lu by demoting him to be the military advisor to the prefect of Shi Prefecture. At a later point, Lu was recalled to Luoyang, and he thereafter served successively as the director of the archival bureau, and then the minister of worship. In 933, as of which time he was again serving as the minister of public works, he and Lü Qi were sent as emissaries to Xichuan Circuit, then ruled by the major warlord Meng Zhixiang, to create Meng the Prince of Shu. On their journey to Xichuan, they went through Fengxiang Circuit, where Li Siyuan's adoptive son Li Congke was then serving as military governor. Lu impressed Li Congke with his impressive appearance and ability to speak.
During Li Congke's reign
In 934, Li Congke overthrew then-emperor Li Conghou, and became emperor. At that time, the leading chancellors were Liu Xu and Li Yu, but they were often arguing with each other and not getting much done in terms of governance. Li Congke was not happy about this situation and considered replacing them. When he consulted with his close associates, they recommended Yao Yi, Lu Wenji, and Cui Jujian. Because Yao, Lu, and Cui each had their strengths and weaknesses, Li Congke could not decide on whom to commission. He therefore wrote their names on pieces of paper and placed the paper in a crystal bottle. After offering incense to heaven, he used chopsticks to take the paper out of the bottle. Lu's name was taken out first, followed by Yao. He therefore commissioned Lu and Yao as chancellors. In the commission, Lu received the titles of Zhongshu Shilang and the chancellor designation Tong Zhongshu Menxia Pingzhangshi. In 935, there was an incident where the official Shi Zaide, whose was said to be blunt and daring, submitted a number of petitions attacking the capabilities of a number of officials and generals, suggesting to Li Congke that he test these officials and generals and demote the ones who were not capable. This drew much anger among the criticized officials. Lu, as well as the consultants Liu Tao and Yang Zhaojian, all suggested that Shi be punished. Li Congke, however, believed that this would discourage open discussions about the affairs of state, issued an edict rejecting their request to punish Shi. Meanwhile, Li Congke believed that the chancellors were not giving him good advice, and was often urging them to do so. Lu and the other chancellors blamed the situation on the fact that they did not, unlike the chancellors during Tang, get a chance to meet with just the emperor at Yanying Hall, and asked that the Yanying Hall meetings be reinstated. Li Congke, however, found this to be unnecessary, and issued an edict stating that he would be willing to meet with them whenever they wanted, and that the Yanying Hall meetings would be unnecessary. In 936, Li Congke's adoptive brother-in-law Shi Jingtang the military governor of Hedong Circuit rebelled, with aid from Later Tang's northern rival Khitan Empire. Li Congke sent the general Zhang Jingda against Shi, but the combined Khitan/Hedong forces defeated Zhang and subsequently put him under siege. Li Congke, distressed about the situation, stated to Lu, "We had previously heard that you, Lord, has the ability to be chancellor, and therefore we made you the leading chancellor despite opposition from others. Now we are facing this disaster. Where are your good strategies?" Lu only could apologize and had nothing further to say. Li Congke, at that time, was himself hesitant to engage Shi, and Lu, sensing this, proposed, along with Zhang Yanlang, that the chief of staffZhao Yanshou be sent to rendezvous with his adoptive fatherZhao Dejun the military governor of Lulong Circuit, to combat the Khitan/Hedong forces. Li Congke agreed. The result was a disaster, however, as Zhao Dejun was more interested in gaining Khitan support for his own desire to be emperor, and did not fully intend to aid Zhang. Eventually, Zhang's army ran out of food, and Zhang's deputy Yang Guangyuan assassinated him and surrendered. The Khitan/Hedong forces then defeated Zhao. Believing that all was lost, Li Congke committed suicide with his family, ending Later Tang. Shi, whom Khitan's Emperor Taizong had declared emperor of a new state of Later Jin, entered Luoyang and took over Later Tang's territory.
During Later Jin
Upon Shi Jingtang's entry into Luoyang, he largely pardoned the Later Tang officials and retained them in his government. Lu Wenji, however, was removed from his post as chancellor, and made the minister of civil service affairs. He was later further removed from this relatively substantive post and given the ceremonial post of Taizi Shaofu. During the reign of Shi Jingtang's nephew and successor Shi Chonggui, he was given the higher ceremonial post of Taizi Taifu.
During the reign of Liu Zhiyuan, the founding emperor of the subsequent Later Han, Lu Wenji received the title of Taizi Taishi. At that time, the capital was at Kaifeng, but many officials not directly involved in imperial governance were given offices at Luoyang. It was said that their conduct was often not proper, and that, while the branch government at Luoyang had imperial censors stationed at them, the imperial censors were not effective in correcting their behavior. Liu put Lu in charge of overseeing the situation and reorganizing these Luoyang officials more effectively. Subsequently, the imperial censor Zhao Li submitted a list of officials that he believed were not engaged in proper behavior, including taking excessive leaves on alleged illnesses. After Liu's chief of staff Yang Bin received this list, he forced the officials Zhao accused into retirement. As Lu was also overseeing the behavior of these Luoyang officials, he ran into frequent conflicts with Yang on this issue, and therefore Lu requested a leave on account of illness — and then was accused by the censors of improperly claiming a sick leave. He therefore was then ordered into retirement with the title of Taizi Taishi.
After Guo Wei, the founding emperor of the subsequent Later Zhou, took the throne, he sent an emissary to Lu Wenji's mansion to bestow the title of Sikong on Lu. Lu died later that year and was given posthumous honors. It was said that throughout his career, Lu accumulated great wealth, but upon his death, his son Lu Guiling spent it all within a span of several years, and that Lu Wenji thus became a cautionary tale for many, against excessive accumulation of wealth.