Overview
Wang Yan (899–926), né Wang Zongyan (王宗衍), courtesy name Huayuan (化源), also known in historiography as Houzhu of Former Shu (前蜀後主; "last lord of Former Shu"), later posthumously created the Duke of Shunzheng (順正公) by the Later Tang dynasty, was the second and final emperor of China's Former Shu dynasty during the Five Dynasties and Ten Kingdoms period. He was the youngest son of founding emperor Wang Jian (Emperor Gaozu), but became his heir because his mother Consort Xu was Wang Jian's favorite concubine and was able to gain the support of the chancellor Zhang Ge.
Wang Yan's reign was traditionally considered one of decadence, corruption, and incompetence. In 925, his state was conquered by its northeastern neighbor Later Tang. Wang Yan surrendered to the Later Tang army, but was later killed by Emperor Zhuangzong of Later Tang.
Background
Wang Zongyan was born in 899, during the reign of Emperor Zhaozong of Tang, as the youngest of the 11 sons of Wang Jian, who was then a major warlord late in the Tang Dynasty as the military governor (Jiedushi) of its Xichuan Circuit (西川, headquartered in modern Chengdu, Sichuan), ruling over modern Sichuan and Chongqing. His mother was Lady Xu, a daughter of the official Xu Geng (徐耕) and a concubine of Wang Jian's, who became his favorite. (Her younger sister was also a concubine of Wang Jian's; therefore, later when they became imperial consorts, she was known as Consort Xu the Greater, while her sister was known as Consort Xu the Lesser.) It was said that Wang Zongyan was capable in literature even in his young age, capable of writing poems.
In 907, after the Tang throne was usurped by another major warlord, Zhu Quanzhong the military governor of Xuanwu Circuit (宣武, headquartered in modern Kaifeng, Henan), who established his own Later Liang as its Emperor Taizu, Wang Jian, who did not recognize the Later Liang emperor, declared himself the emperor of a new state of Shu (historically known as Former Shu). In 910, Wang Jian created all of his sons (except his second Wang Yuantan, whom he had earlier created Crown Prince) to be imperial princes, and Wang Zongyan was created the Prince of Zheng.
From Wikipedia (CC BY-SA 4.0).