The Real Onmyoji: Abe no Seimei, the Protected Capital of Heian-kyo and the Magic of Yin and Yang
Share
Scientists of the Imperial State: The Bureau of Onmyo and Its Four Fields
In modern novels, films and manga, onmyoji are usually portrayed as mysterious sorcerers in elegant court robes who command invisible spirit servants called shikigami to subdue evil spirits and vengeful ghosts. Abe no Seimei, a real onmyoji of the Heian period, remains an enormously popular hero of pop culture thanks to his extraordinary powers and mysterious legends.
Yet when we examine historical sources, the original onmyoji was not a magician who controlled the supernatural but a highly skilled government official who supported the ancient Japanese state through science and knowledge.
The history of Onmyodo, "the Way of Yin and Yang," began in the sixth and seventh centuries with the arrival, from mainland China by way of the Korean peninsula, of a comprehensive body of knowledge that included the theory of yin-yang and the five elements, astronomy, calendar science and divination.
The theory of yin-yang and the five elements is an ancient Chinese natural philosophy holding that everything in the universe arises from the waxing and waning of the two forces, yin and yang, and the cycle of five elements: wood, fire, earth, metal and water.
Under the Taiho and Yoro legal codes established in the early eighth century, the imperial court set up a specialist government office, the Onmyoryo, or Bureau of Onmyo, under the Ministry of the Center.
Its head, the Onmyo no Kami, oversaw four specialized departments: Onmyodo, responsible for divination and geomancy (feng shui); Tenmondo, which observed the movements of heavenly bodies and unusual events such as eclipses and comets; Rekido, which prepared an accurate calendar and calculated the dates of farming seasons and court ceremonies; and Rokokudo, which managed water clocks and announced the time.
At the time, unusual events in the sky were believed to be grave omens concerning the rise and fall of the state and the virtue of its rulers. Astronomical observation and calendar-making were therefore matters of the highest military and political secrecy. Private individuals were strictly forbidden by law to observe the heavens or possess astronomical texts, and onmyoji were privileged technical officials who handled the state's most closely guarded knowledge.

Heian Aristocrats, Taboos and Directional Avoidance: A Protected City Born of Fear
The onmyoji, originally government officials, rapidly took on a more magical and religious character in the Heian period, during the ninth and tenth centuries. As the capital's move to Heian-kyo was partly driven by fear of the vengeful spirit of Prince Sawara, this was an age dominated by goryo shinko, the belief that epidemics and natural disasters were curses of the angry spirits of those who had died unjustly.
Aristocrats lived in fear of unseen curses and the presence of mononoke, malevolent spirits, and bound their daily lives with strict religious taboos. Two of the most important were monoimi and katatagae. To avoid directions occupied by wandering malevolent deities, whose position changed from day to day, nobles would not travel straight to their destination.
Instead they spent the night before at a house in another direction and then set out from there, a practice called katatagae, "changing direction." On days after an ominous dream or celestial omen, they shut themselves inside, cut off all contact with others and recited sutras and prayers to avoid defilement, a practice called monoimi.
To relieve these everyday anxieties, aristocrats relied heavily on onmyoji to judge which directions were lucky or unlucky and to choose favorable days. State rituals were also held to drive away epidemics and disasters: the Shikaisai, held at the four boundaries of the capital to keep out evil forces, and the Shikakusai, held at crossroads in the city to calm the gods of plague.
Heian-kyo itself was a vast protected city designed according to feng shui principles, and the onmyoji served as the guardians who maintained its invisible barriers.

The Astronomer Abe no Seimei: History and Legend
The greatest figure of mid-Heian Onmyodo was the master astronomer Abe no Seimei (921-1005). Though born into a lower-ranking noble family, Seimei was recognized for his talent by his teachers Kamo no Tadayuki and his son Yasunori, studied astronomy and eventually won the deep trust of leaders of the court, including Fujiwara no Michinaga.
Official histories and courtiers' diaries record many instances of Seimei divining the date for an emperor's abdication or carefully performing protective rituals at aristocratic residences, confirming that he was a highly capable official at the forefront of his field.
After his death, however, in tale collections compiled from the late Heian period into the medieval era, such as the Konjaku Monogatarishu and the Uji Shui Monogatari, Seimei was gradually deified into a legendary giant wielding supernatural magic.
The tales about him are countless. As a child, he is said to have seen a night parade of demons and saved his teacher's life. He kept twelve shikigami hidden under the Ichijo Modoribashi bridge and had them help with household chores. He competed in magic with his rival, the folk onmyoji Ashiya Doman of Harima, and won their contest of curses. He even crushed a frog to death with a single blade of grass.
These stories are, of course, later literary embellishments and folk inventions. But why was Seimei alone turned into such a dramatic legend? Because he established in Japanese Onmyodo the Taizan Fukun-sai, an advanced Taoist ritual from China, and was feared as the ultimate ritualist directly involved in human life span, life and death. Taizan Fukun is a Taoist god of the underworld who governs human lifespans.
The success of this secret rite, performed to extend the lives of gravely ill emperors and nobles, was the decisive factor that carved Seimei's name into history as an immortal sorcerer.

From Secret Court Rites to Village Diviners: Onmyodo in Everyday Life
From the medieval to the early modern period, as political power shifted from the court nobility to the samurai, Onmyodo also changed greatly. Abe no Seimei's descendants became the Tsuchimikado family and the Kamo descendants the Kadenokoji family, inheriting their positions at court. But when central authority collapsed in the turmoil of the Sengoku period, onmyoji skills and magic spread into the provinces and seeped into ordinary people's rituals through wandering folk practitioners.
In the Edo period, the shogunate officially authorized the Tsuchimikado family to oversee and license onmyoji throughout the country, and they founded Tsuchimikado Shinto, a blend of Shinto and Onmyodo. Local folk onmyoji came to handle rituals closely tied to everyday life: distributing calendars, performing groundbreaking ceremonies, reading the fortune of houses and graves, and praying to ward off misfortune.
Many customs still practiced in Japan today carry the view of nature and wisdom about fortune nurtured by Onmyodo: the jichinsai ceremony performed before building a house, the six-day cycle of lucky and unlucky days such as taian and butsumetsu printed on calendars, the bean-throwing of Setsubun and purification for "unlucky years."
Beginning as scientific officials, transforming into magicians who answered the anxieties of their age, and finally merging into the everyday culture of ordinary people, the onmyoji left a trail that reflects the spiritual history of ancient and medieval Japan: a sincere effort to face the invisible threats of nature and the injustices of fate with both intellect and prayer.
Explore the Art of Mori no Akari
The Mori no Akari Series brings Japanese history, mythology and traditional design into imaginative artwork. Browse our digital download products for coloring pages and reference artwork you can enjoy at home.
Related Article
References
- Kosaka Shinji, Abe no Seimei sen "Senji Ryakketsu" Shokai, Kyuko Shoin, 2004
- Saito Hideki, Onmyojitachi no Nihonshi, Kadokawa Sensho, 2014
- Koba Akinori, Onmyodo no Seiritsu to Tenkai, Yoshikawa Kobunkan, 2007
- Shigeta Shin'ichi, Abe no Seimei: Onmyojitachi no Heian Jidai, Yoshikawa Kobunkan, 2006
- Mezaki Tokue, Heian Bunkashi Ron, Kasama Shoin, 1995
Read this article in Japanese · More Japanese History & Culture
Mori no Akari Series

Onmyoji Fantasy Coloring Set 02 with Color References — Digital Download
¥780
Explore Japanese history and traditional motifs through downloadable coloring artwork. No physical item is shipped. Follow the product link for the current price, availability and download details.
Mori no Akari Series
Explore related Japanese art
Enjoy the themes of this article through coloring pages, stickers and books. Choose digital downloads for home printing, or check physical products for delivery availability.
Digital downloads: no physical shipping. For printed products, confirm the contents, delivery destination and shipping at the product page before ordering.