Wang Xianzhi (王仙芝) (died 878) was a major agrarian rebel during the reign of Emperor Xizong of Tang, whose rebellion, while failing, along with those of his one-time ally Huang Chao, began a series of rebellions that led to Tang Dynasty's disintegration.
Wang Xianzhi was from Pu Prefecture (濮州, in modern Puyang, Henan), and like his eventual ally Huang Chao was a salt bootlegger (i.e., selling salt that was not part of the Tang state monopoly). He started his rebellion in 874 at Changyuan (長垣, in modern Xinxiang, Henan), in the midst of serious natural disasters — alternate floods and droughts — that severely affected the part of the empire east of the Hangu Pass (i.e., modern Henan, Hebei, and Shandong) that the imperial government was taking little action to relieve the people from the effects of. His rebellion began with a thousand men, but quickly, after he and his ally Shang Junzhang (尚君長) captured Pu and Cao (曹州, in modern Heze, Shandong), their forces increased to tens of thousands, and when the military governor (Jiedushi) of Tianping Circuit (天平, headquartered in modern Tai'an, Shandong), Xue Chong (薛崇), tried to intercept Wang's forces, Wang defeated him. Meanwhile, Huang, who was from Yuanju (冤句, also in modern Heze), also started a rebellion, and they were loosely aligned at this point with each other. Late in 875, Wang attacked Yi Prefecture (沂州, in modern Linyi, Shandong). Song Wei (宋威) the military governor of Pinglu Circuit (平盧, headquartered in modern Weifang, Shandong) then volunteered to attack Wang. Then-reigning Emperor Xizong approved the suggestion, and put Song in overall command of the operation, putting Song in command of not only troops from his own circuit but troops from many others.