Lü Yongzhi (呂用之) (d. December 29, 887) was a sorcerer late in the Chinese dynasty Tang Dynasty, who became trusted by Gao Pian the military governor (Jiedushi) of Huainan Circuit (淮南, headquartered in modern Yangzhou, Jiangsu) and became very powerful at Huainan, at one point becoming more powerful than Gao himself. Subsequently, Gao's officer Bi Shiduo rose in resistance, plunging the circuit into intense internecine warfare. Lü, after Bi defeated him, aligned himself with Yang Xingmi, but after Yang's victory over Bi and Qin Yan, Yang executed him.
It is not known when Lü Yongzhi was born, but it is known that he was from Poyang (鄱陽, in modern Shangrao, Jiangxi) and that he came from a family of tea merchants. Because of the family's merchant tradition, he had visited and was familiar with Huainan Circuit's capital Guangling (廣陵). After his father's death, he became dependent on his maternal uncle, but at some point stole his uncle's money and fled to Mount Jiuhua, where he became a student of the sorcerer Niu Honghui (牛弘徽), who taught him magic. Lü subsequently returned to Guangling and peddled herbs and medicines on the street. He became acquainted with the army officer Yu Gongchu (俞公楚), who was a close associate of the military governor Gao Pian. After he convinced Yu that his magical abilities were genuine, Yu introduced him to Gao. Gao, who was himself dabbling in magic, came to believe in Lü's abilities as well, particularly since Lü also made a number of policy recommendations to him. He thus made Lü an officer in his army and became close to Lü.
After Lü Yongzhi gained Gao Pian's trusts, he began to bribe Gao's attendants to keep Gao under surveillance, so that he could falsely claim to Gao that what he knew was based on his magical powers. He also alienated Gao from those officers that Gao had previously been close to — causing Gao to strip Liang Zuan (梁纘) of his command, kill Chen Gong (陳珙) and his household, and distance himself from Feng Shou (馮綬), Dong Jin (董瑾), Yu Gongchu, and Yao Guili (姚歸禮). He further introduced fellow sorcerers Zhang Shouyi (張守一), Zhuge Yin (諸葛殷), and Xiao Sheng (蕭勝) to Gao, grouping together to seize more and more of the actual power at Huainan's headquarters. He encouraged Gao to spend much of the army's wealth on building temples, and further established a group of secret police to spy on the people, using what they found as excuses to incriminate people and seize their wealth. Under Lü's suggestion, Gao established an elite Moxie Corps (莫邪), with Lü and Zhang in command. Lü lived luxuriously, and gained a group of over 100 concubines, such that even with the great amount of wealth that Gao was giving him, he still had insufficient funds to maintain his households, so he embezzled the funds that Gao had access to as the director of Tang's governmental monopolies on salt and iron, for his own use. It was said that due to Lü's urging that Gao spend his time on seeking divinity, Gao no longer paid any attention to governance and rarely met his staff members, and the people began to not know who he was any more.