[3] In 792, during the reign of Emperor Dezong, Wang Ya passed the imperial examinations in the class of those who used grand speech, and he was made the sheriff of Lantian County (藍田, in modern Xi'an, Shaanxi).
Niu Sengru, Huangfu Shi (皇甫湜), and Li Zongmin were considered to have written criticisms that were particularly on point and were ranked the highest by the officials in charge of grading, Yang Yuling (楊於陵) and Wei Guanzhi.
Due to Li Jifu's accusations, Pei and Wang were stripped of their imperial scholar status and both demoted—with Wang being made Duguan Yuanwailang (都官員外郎), a low-level official at the ministry of justice (刑部, Xingbu), and subsequently being sent out of the capital to serve as the military advisor to the prefect of Guo Prefecture (虢州, in modern Sanmenxia, Henan).
[2] In winter 820, after Tufan forces made a two-pronged incursion later in the year and attacked Ya Prefecture (雅州, in modern Ya'an, Sichuan),[9] Wang submitted a petition suggesting that a request be made to the "northern barbarians" (probably referring to Huigu) requesting them to attack the "western barbarians" (i.e., Tufan) and offering great rewards if they did so.
By the time that Wang Ya's petition arrived at Chang'an, however, Yingmo Circuit (瀛莫, headquartered in modern Cangzhou, Hebei), which had been carved out of Pinglu Circuit previously, had already mutinied and rejoined Lulong, with the soldiers arresting its imperially commissioned governor Lu Shimei (盧士玫) and delivering him to Zhu.
In 826, he was made the military governor of Shannan West Circuit (山南西道, headquartered in modern Hanzhong, Shaanxi), as well as its capital Xingyuan Municipality (興元).
Once the musical reorganization was done, Wang, along with the secretary general of the worship ministry Li Kuo (李廓) and the director of palace supplies Yu Chengxian (庾承憲) presented the musicians to Emperor Wenzong.
[2] In 830, Wang was made the minister of civil service affairs (吏部尚書, Libu Shangshu) and acting Sikong (司空, one of the Three Excellencies), as well as the director of the salt and iron monopolies and grain supplies again.
Later that year, he was made Zuo Pushe (左僕射), one of the heads of the executive bureau (尚書省, Shangshu Sheng), and continued to be director of the monopolies and supplies.
[2] In 833, Wang was again made chancellor with the title Tong Zhongshu Menxia Pingzhangshi, and continued to serve as the director of the monopolies and supplies.
[11] In spring 834, he was given the additional titles of acting Sikong, Menxia Shilang (門下侍郎, the deputy head of the examination bureau), imperial scholar at Hongwen Pavilion (弘文館), and the director of Taiqing Palace (太清宮).
In 835, due to Zheng's suggestion, Wang, despite his knowing that doing so was ill-advised, proposed an increase to the tea tax, which caused the people much distress.
It was said that because the people particularly resented Wang Ya for raising tea taxes, they cursed and threw rocks or brick fragments at him as he was paraded.
In spring 836, the senior official Linghu Chu requested that their bodies be buried, and Emperor Wenzong ordered such burial.
[2] With regard to Wang's and Jia's death, the Song dynasty historian Sima Guang, the author of the Zizhi Tongjian, commented:[12] The commentators all state that Wang Ya and Jia Su were both talented in literary abilities and had good reputations, and that they did not know about the conspiracy of Li Xun and Zheng Zhu but were nevertheless massacred with their families.
It is that Heaven destroyed them, not Qiu Shiliang.Wang Ya's grandnephew Wang Yu (王羽) fled to Liu Congjian the reigning Military Governor of Zhaoyi.