He was killed during an uprising he started against the powerful official Tang Daoxi and posthumously demoted to commoner status.
[1][2] His mother was a Lady Zhang, who later would be given the imperial consort title of Guifei (貴妃) after Wang Jian founded Former Shu.
[1] However, he was also said to be arrogant and violent,[5] paying no heed to the counsel of the officials Wang Jian put on his staff.
Wang Jian, not wanting them to be in constant conflict, made Tang the military governor (jiedushi) of Shannan West Circuit (山南西道, headquartered in modern Hanzhong, Shaanxi) in 910 to separate them.
[3] The night before (August 10), Wang Yuanying held a feast for the imperial princes and high-level officials, but three invitees—Wang Jian's adoptive son Wang Zonghan (王宗翰) the Prince of Ji, and the officials Pan Qiao (潘峭, who succeeded Tang Daoxi as the director of palace communications) and Mao Wenxi (the chief imperial scholar)—did not attend.
Meanwhile, Wang Yuanying's trusted officers Xu Yao (徐瑤) and Chang Qian (常謙) were gazing at Tang.
Further, he agreed to Tang's request to mobilize the regular troops to defend the palace (rather than the imperial guards, who were formally under Wang Yuanying's command).
[4] The next day (August 12), Xu, Chang, and Yan Lin (嚴璘), under Wang Yuanying's direction, attacked Tang's forces.