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).
In summer 876, Song attacked Wang at Yi Prefecture and defeated Wang.