Little is known about Lu Yanwei's background, as neither of the official histories of Tang Dynasty — the Old Book of Tang and the New Book of Tang — contained a biography for him. The first reference to him in the Zizhi Tongjian was in 885, when a mutiny at Yichang's capital Cang Prefecture led to the expulsion of the previously military governor Yang Quanmei, who fled to neighboring Lulong Circuit. The soldiers supported Lu to be their acting military governor. Then-reigning Emperor Xizong, however, did not make Lu military governor, instead commissioning the imperial guard officer Cao Cheng as military governor and Lu as the prefect of one of Yichang's three prefectures, De Prefecture. However, it appeared that Lu refused to allow Cao to report to Yichang, and continued to request a military governor commission; the imperial government repeatedly rejected his request. In 890, by which time Emperor Xizong's brother Emperor Zhaozong was emperor and was launching a general campaign against the major warlord Li Keyongthe military governor of Hedong Circuit, Lu's neighbors Wang Rong the military governor of Chengde Circuit and Luo Hongxin the military governor of Weibo Circuit petitioned the imperial government on his behalf again. The imperial government, already locked in a campaign against Li Keyong, decided to commission Lu as military governor.
As military governor
In late 894, Li Keyong attacked and conquered Lulong. Lulong's military governor Li Kuangchou fled to Yichang. Instead of taking Li Kuangchou under his protection, however, Lu Yanwei was envious of the amount of wealth that Li Kuangchou brought from Lulong, and so attacked Li Kuangchou at Jingcheng and killed him, seizing his wealth and his followers, including his concubines. As the years went by, Lu developed a reputation for being cruel and insolent in his relations with neighboring circuits. As of 898, he was locked in a dispute over the salt trade with Lulong's then-military governor Liu Rengong. Liu sent his son Liu Shouwen to attack Cang Prefecture. Lu could not resist the attack, and therefore abandoned the city and fled to Weibo Circuit with his family. When Luo Hongxin refused to receive him, he further fled to Xuanwu Circuit. That was the last reference in history about Lu, and it is not known what his fate was once he fled to Xuanwu.