Background
Xiao Yan, the founding emperor of the Liang dynasty (502-57) in southern China during the division between the north and the south, was born in 464 to an aristocratic family that belonged to the same imperial clan as that of the ruling Southern Qi dynasty. Yan therefore enjoyed a comfortable early life ad an easy entrance into government service. Despite his posthumous epithet Wu ("Martial Emperor"), he was a talented writer and deeply religious.
Emperor Wu created universities and extending the Confucian civil service exams, demanding that sons of nobles study. He was well read himself and wrote poetry and patronized the arts. Although for governmental affairs he was Confucian in values, he embraced Buddhism as well. He himself was attracted to many Indian traditions. He banned the sacrifice of animals and was against execution. It was said that he received the Buddhist precepts during his reign, earning him the nickname 'The Bodhisattva Emperor'.
At the end of his reign, his overly lenient attitude on his clan's and officials' corruption and lack of dedication to the state came at a heavy price; when the general Hou Jing rebelled, few came to his aid, and Hou captured the capital Jiankang, holding Emperor Wu and his successor Emperor Jianwen under close control and plunging the entire Liang state into anarchy. Emperor Liang himself died while under house arrest, with some historians believing that Hou starved him to death.