This article has multiple issues. Please help improve it or discuss these issues on the talk page. (Learn how and when to remove these template messages)(Learn how and when to remove this template message)
Onmyōdō (陰陽道, also In'yōdō, lit. 'The Way of Yin and Yang') is a traditional Japanese esoteric cosmology, a mixture of natural science and occultism. It is based on the Chinese philosophies of Wu Xing (five elements) and yin and yang, introduced into Japan at the beginning of the 6th century. It was accepted as a practical system of divination. These practices were influenced further by Taoism, Buddhism and Shintoism, and evolved into the system of onmyōdō around the late 7th century. Onmyōdō was under the control of the imperial government, and later its courtiers, the Tsuchimikado family, until the middle of the 19th century, at which point it became prohibited as superstition.
In the 5th and 6th centuries, the principles of yin-yang and the Five Elements were transmitted to Japan from China along with Buddhism and Confucianism. Yin-yang and the Five Elements, as well as the divisions of learning to which they were linked – astronomy, calendar-making, the reckoning of time, divination, and studies based on observation of nature – were amalgamated into fortune telling. This process of judging auspicious or harmful signs present in the natural world, was accepted into Japanese society as a technique for predicting good or bad fortune in the human world. Such techniques were known mostly by Buddhist monks from mainland Asia, who were knowledgeable in reading and writing Chinese. Over time, demand from members of the imperial court who believed that onmyōdō divination would be helpful in decision-making, made it necessary for the laity to perform the art, and onmyōji began to appear around the middle of the 7th century.
During the Heian period the nobility organized their lives around practices recommended by onmyōji. The practice of "lucky and unlucky directions" provides an example. Depending on the season, time of day, and other circumstances, a particular direction might be bad luck for an individual. If one's house was located in that direction, such an individual was advised not to go back directly to his house but had to "change direction" (katatagae), by going in a different direction and lodging there. Such a person would not dare to go in the forbidden direction, but stayed where they were, even if that resulted in absence from the court, or passing up invitations from influential people.
In the 10th century Kamo no Tadayuki (賀茂 忠行) and his son Kamo no Yasunori, made great advancements in onmyōdō, astronomy and calendar science. From among their students emerged Abe no Seimei, who displayed superior skills in the divining arts of onmyōdō, by which he gained an uncommon amount of trust from the court society. Tadayuki and Yasunori passed on their skills in astronomy to Seimei while their advances in calendar-making went to Yasunori's son. From the end of the Heian period into the Middle Ages, astronomy and calendar science were completely subsumed into onmyōdō, and the Abe and Kamo families came to dominate the art.
Onmyōji (陰陽師, also In'yōji) was one of the classifications of civil servants belonging to the Bureau of Onmyō in ancient Japan's ritsuryo system. People with this title were professional practitioners of onmyōdō.
Onmyōji were specialists in magic and divination. Their court responsibilities ranged from tasks such as keeping track of the calendar, to mystical duties such as divination and protection of the capital from evil spirits. They could divine auspicious or harmful influences in the earth, and were instrumental in the moving of capitals. It is said that an onmyōji could also summon and control shikigami.
Onmyōji had political clout during the Heian period, but in later times when the imperial court fell into decline, their state patronage was lost completely. In modern-day Japan onmyōji are defined as a type of priest, and although there are many who claim to be mediums and spiritualists, the onmyōji continues to be a hallmark occult figure.