Wang Shaoyi (; died 866), formally the Count of Taiyuan (Chinese: 太原伯), was a general of the Chinese dynasty Tang dynasty who ruled Chengde Circuit (成德, headquartered in modern Shijiazhuang, Hebei) in de facto independence from the imperial government as its military governor (Jiedushi).
It is not known when Wang Shaoyi was born. His family had been, prior to his generation, in control of Chengde Circuit for two generations, after his grandfather Wang Tingcou seized control of the circuit in 821 without imperial approval and eventually forced the imperial government to acquiesce; his father Wang Yuankui later succeeded Wang Tingcou and took a more conciliatory stance with the imperial government. Wang Shaoyi had at least one older brother, Wang Shaoding.[1]
When Wang Yuankui died in 855, the soldiers supported Wang Shaoding to succeed him. Then-reigning Emperor Xuānzong initially made Wang Shaoding acting military governor, and, later in the year, full military governor. However, Wang Shaoding was inappropriate in his behavior, favoring drinking, and particularly liking to sling bullets at people from towers for fun. The soldiers became so displeased with him that they considered overthrowing him, but before they could do so, he fell ill and died in 857. The soldiers supported Wang Shaoyi, who was then deputy military governor, to succeed him. Emperor Xuānzong approved and made Wang Shaoyi acting military governor, and then military governor.[2]
Wang Shaoyi's rule was said to be simple and lenient, and both the soldiers and the people were happy about his rule.[3] He was created the Count of Taiyuan, although it is not clear which emperor did so.[1]
In 866, Wang Shaoyi grew ill. He summoned Wang Shaoding's son Wang Jingchong[3] — who was not Wang Shaoding's oldest son but was considered Wang Shaoding's proper heir, having been born of Wang Shaoding's wife[1] — and stated to Wang Jingchong:[3]
Wang Shaoyi died after speaking. Emperor Xuānzong's son and successor Emperor Yizong subsequently approved the succession and made Wang Jingchong military governor.[3]