 In 896, when the chancellor Cui Yin was commissioned as the military governor ("Jiedushi") of Wu'an Circuit (武安, headquartered in modern Changsha), Henan, Cui invited Wang to serve on his staff as his secretary in his role as governor (觀察使, "Guanchashi").After Cui's commission was cancelled shortly after and he was allowed to remain as chancellor due to the intercession of his ally Zhu Quanzhong the military governor of Wuanwu Circuit, Wang also remained at the imperial government, becoming a scholar at Jianxian Hall (集賢殿).Thereafter, at the request of Zhao Guangfeng the deputy chief imperial censor, Wang was made "Xingbu Langzhong" (刑部郎中), a supervisory official at the ministry of justice (刑部, "Xingbu"), but was also put in charge of the general affairs of the office of censors (御史臺, "Yushi Tai").