Menshen
Menshen or threshold guardians are divine guardians of doors and gates in Chinese folk religions, used to protect against evil influences or to encourage the entrance of positive ones. They began as the divine pair Shenshu () and Yulü () under the Han, but the deified generals Qin Shubao () and Yuchi Gong () have been more popular since the Tang. In cases where a door god is affixed to a single door, Wei Zheng or Zhong Kui is commonly used. History. The gates and doors of Chinese houses have long received special ritual attention. Sacrifices to a door spirit are recorded as  early as the "Book of Rites". By the Han, this spirit had become the two gods Shenshu and Yulü, whose names or images were painted into peachwood and attached to doors. The Great Ancestor of the Tang ("Emperor Taizong") ordered portraits of his generals Qin Shubao and Yuchi Gong to be affixed to gates. They eventually came to be considered divine protectors, replacing Shentu and Yulü and remaining the most common door gods to the present day. Qin and Yuchi, along with various other deified military leaders, make up a class of intended to ward off evil spirits and bad  influences. A separate group of scholars make up a class of intended to attract blessings and good fortune. Some deities are also thought to have guardians who serve a similar role at their temples, such as Mazu's companions Qianliyan and Shunfeng'er. Legends. The 10th chapter of the Chinese novel "Journey to the West" includes an account of the origin of door gods. In it, the Dragon King of the Jing River disguised himself as a human to outsmart the fortune teller Yuan Shoucheng. Since he was able to control the weather, he made a bet with Yuan about Chang'an 's forecast for the next day. He was nonplussed, however, when he received an order from the Jade Emperor telling him to give the city precisely the weather Yuan had predicted. The Dragon King preferred to win the bet and disregarded the order, going to Yuan to gloat the next day. Yuan remained calm and revealed that he had known the Dragon King's identity all along. Moreover, since the dragon had been so arrogant as to disregard an order from the Jade Emperor, his doom would be short in coming. The dragon was shocked to see his disobedience known  and immediately pleaded with Yuan to save him. Yuan let him know that the Jade Emperor would send Wei Zheng—a senior minister from the court of the Great Ancestor of the Tang ("Emperor Taizong")—to execute him at noon the following day. He told him his best course of action was to ask Taizong for help and, taking pity on the Dragon King, the emperor agreed to save him. In order to do so, the emperor summoned Wei Zheng to play go with him in the morning. He endeavored to keep Wei from leaving until after noon, preventing him from  carrying out the Jade Emperor's order, and was delighted when Wei grew so tired with the long game that he fell asleep. A little while later, however, the Great Ancestor was told that a dragon's head had fallen from the sky. Wei awoke and told him that his spirit had left his body during his nap and gone to Heaven to carry out the Jade Emperor's order. The annoyed spirit of the Dragon King then haunted the Great Ancestor each night until his generals Qin Shubao and Yuchi Gong volunteered to stand guard at his door. The  emperor enjoyed his peaceful sleep but did not want to continue bothering his two generals. In their place, he had artists paint their portraits and paste them to the doors. This was then copied by his subjects. Architecture. In modern use, door gods are usually printed images which are pasted to paired doors. They are usually replaced every Chinese New Year. Occasionally, they are sculpted in relief or placed as statues to either side of a door. The figures should face each other; it is considered bad luck to place them back to back. Worship. In ancient China, there was  a ritual for a sacrifice to the door spirit of a wealthy home recorded in the "Book of Rites". In modern China, door gods do not make up a formal element of Taoism and are included as traditional decorations or as nods to popular superstition. There are, however, some deities worshipped for other reasons—including the Azure Dragon, the White Tiger, and Mazu's companions Qianliyan and Shunfeng'er—who also serve as door gods at Taoist temples. List. The following persons, some of whom are mythological figures, are known to have been worshipped as door gods.