Category: Chinese mythology
 Yanluowang is the name of the Chinese god of the underworld. You can find numerous variations of this name: already Yanluowang can also be written “Yanluo Wang”, because “wang” means king. So he is “King Yanluo” – but some people also call him by his shortened name, “King Yan” aka “Yan Wang” aka “Yanwang”. Other variations include Yanwangye (Grandfatherly King Yan), Yanjun (Lord Yan) or King Yan-lo / Yan-lo Wang (a simplification of the “Yanluo”).
  Originally, Yanluo Wang was a transliteration of the Indian deity of death “Yama”: spread through Buddhism into China, the name “Yama” was there translated as “Yanluo”. Now, while King Yanluo is the Chinese equivalent of the original Yama, he still became with time its own character and its own deity.
According to Chinese mythology, King Yanluo is the god of death, and the ruler of the Diyu (the underground realm of the dead in Chinese mythology, usually translated by “hell”). Appearing as a very large man with a long beard, bulging eyes and a scowling face (sometimes with red skin), he either wears a crown to show his role as a king, or a judge’s robe alongside a judge’s cap. For, on top of being ruler of the afterlife, King Yanluo is also the judge of the dead. He owns a great book in which is listed the names of all the living beings of the world, as well as the date of their death as planned by the great cosmic forces: upon said date, King Yanluo sends his two servants, Ox-Head and Horse-Face (psychopomps with the titular animal heads on human bodies, and the dreaded monstrous guardians of the Diyu), so that they would bring the deceased before him. King Yanluo then judges the dead: if the dead had a good life of great merit, they will be sent to a pleasurable realm located between the earth of mortals and the heaven of the gods, before being reincarnated in a good and just as pleasant life. If the dead however was a vile, sinful or criminal person, they will go into the depths of the Diyu to undergo harsh punishments fitting their crimes, before being reincarnated into a life full of misery and suffering.
While some accounts say that King Yan is the only ruler and judge of the Diyu and thus that all the dead must pass before him to get their judgement, an alternate account just as popular explains that rather King Yan is the greater and most powerful of the various judges and rulers of Hell. Variations include the Diyu being under the rule of eight or eighteen different courts, each one specialized in a different kind of soul or a different kind of dead, and each one overseen by a different Yan King – but the most well-known version is the one of the “Ten Kings of Hell”, all overseen by the great and powerful “original” King Yanluo. Though, with time, despite King Yanluo’s great popularity among common folk and his heavy presence in art, he ended up slowly removed from the position of “head of Diyu”, only ending as the fifth of the Ten Kings of Hell, on equal footing with his various colleagues – all named at the head of the Diyu’s judicial system by the Jade Emperor himself (he is basically the leader of the cosmos).
Things get even more complicated when you take into account that, in Chinese mythology, the position and rules of the gods are actually titles, functions and rewards part of a gigantic hierarchy that is basically a “cosmic bureaucracy”. As a result, some versions treat the name “King Yan” or “King Yanluo” not as the name of a specific character or god, but rather as a title that can be given to various people: several accounts speak of human beings that were given the title of “Yan” as a reward after their death. A few legends even claim that some humans became King Yan WHILE THEY WERE ALIVE: they were magistrates in the human world during the day, and at night instead of sleeping went to the underworld to perform they duty of judge of the dead. Several names of major historical figures are invoked when it comes to these “human Yanluo Wang”, but one reoccurs the most often: Bao Zheng, a politician and prefect of the 11th century renowned for his honesty and his fight against corruption: his crusade against injustice and uprightness made him so famous that in Chinese culture he is considered a true symbol of justice, even being called “Justice Bao”. It is thus fitting that people thought he was given after his death the judge of the dead.