According to one story, the wan-yiehs were among the 360 scholars who were massacred during the reign of Emperor Hsuantsung of the Tang dynasty. Another account says that they were included in the 360 scholars who passed the examination to become officials just before the Ming Dynasty was overthrown. Rather than surrender to the Manchus, they committed suicide, and were later deified to redress the wrongs done to them.
（一）有一種說法是：這些王爺是明末最後一次科舉所錄取的進士，明朝不久滅亡了，這些新進士不願降清，全部自殺殉國，玉皇大帝憫其孤忠，封他們為「王爺」。