is a 2001 Japanese film directed by Yà Âjirà  Takita. It tells of the exploits of famed onmyà Âji Abe no Seimei, who meets and befriends bungling court noble Minamoto no Hiromasa. Together they protect the capital of Heian-kyà  against an opposing onmyà Âji, Dà Âson, who is secretly plotting the downfall of the emperor.
A sequel, Onmyoji II, appeared in 2003. Both movies are based on the Onmyà Âji series of short stories by author Baku Yumemakura, which also inspired a manga series by Reiko Okano.
The Heian period (9thâÂÂ12th centuries) was a time when human beings and various supernatural beings still coexisted with each other, the latter occasionally causing trouble to humans. Practitioners of the art of onmyà Âdà Â, the onmyà Âji, were held to be able to control and subdue these malevolent entities and other paranormal phenomena, and were thus held in high regard, being employed by the imperial court.
In Heian-kyà Â, nobleman Minamoto no Hiromasa meets court onmyà Âji Abe no Seimei, a mysterious man about whom many rumors have been told. On a dare by some courtiers, Seimei demonstrates his exceptional skills in onmyà Âdà  by killing a butterfly without touching it (i.e. casting a spell on a leaf which then flies and cuts through it).
Hiromasa later visits Seimei at his home, where he sees Seimei's shikigami in human form, one of whom was Mitsumushi, the butterfly he had killed (and subsequently revived) earlier. Seimei joins Hiromasa in inspecting a mysterious gourd growing from a pine tree in Lord Kaneie's house; Seimei reveals the gourd to have been caused by a curse cast by a former lover of Kaneie who committed suicide.
One night, Hiromasa impresses an unseen lady on an oxcart with his flute playing. Unbeknownst to him, this woman is Sukehime, Minister of the Right 's daughter and one of the current emperor's wives, who is worried that she is losing the emperor's favor as another wife, Lady TÃ Âko, the daughter of Minister of the Left Fujiwara no Morosuke, had just given birth to a baby boy, who is to be the heir to the throne.
Meanwhile, the head onmyà Âji of the imperial , Dà Âson, is secretly plotting to overthrow the emperor by trying to awaken the vengeful spirit of Prince Sawara, who had died 150 years earlier. Wrongfully accused of treason by his brother, the Emperor Kanmu, Sawara committed suicide, but not before swearing eternal vengeance on the Son of Heaven (i.e. the emperor). When Dà Âson curses the emperor's newborn son, Prince Atsuhira, to be possessed by an evil spirit, Seimei combats his spells and drives the demon away with the help of Hiromasa and the immortal Lady Aone, who was ordered by Kanmu to guard the burial mound where Prince Sawara's spirit is sealed away.
Hiromasa once again meets Sukehime (again unseen by Hiromasa) on the oxcart. He confesses his feelings for Sukehime, who he calls 'Lady of the Full Moon' (æÂÂæÂÂã®å Mochizuki no kimi), but Sukehime, who still loves the emperor, rejects his advances.
Both Seimei and Aone are put under arrest by Motokata and accused of cursing the infant prince. They are saved in the nick of time by Morosuke, who points out it is unlawful to kill a court onmyà Âji without imperial permission. Dà Âson, who is implied to be behind the allegation, enchants one of the imperial police to attack the two; Aone is severely wounded, but proves to be unharmed due to her immortality.
Taking advantage of Sukehime's jealousy against Tà Âko, Dà Âson uses his powers to turn her into a namanari (a woman halfway to becoming an oni) that harasses both Tà Âko and the newborn Atsuhira. Seimei uses onmyà Âdà  to transform straw effigies into the likenesses of the Emperor and the infant prince. Sukehime arrives and assaults the effigies, thinking them to be the real emperor and Atsuhira. The emperor, moved by a waka poem she recites (the same poem Hiromasa hears the lady on the oxcart recite earlier), speaks out loudly, breaking Seimei's spell. Hiromasa, recognizing Sukehime to be his 'Lady of the Full Moon', steps in to accost her.
Sukehime briefly comes back to her senses when Seimei removes a paper talisman attached to her back, but DÃ Âson doubles his efforts, and she completely transforms into an oni. When Hiromasa sacrifices himself by allowing her to bite on his arm, Sukehime comes back to her senses once more and kills herself with Hiromasa's tachi. In her final moments, Sukehime - now a human once more - begs to hear Hiromasa's flute one last time.
Seimei shoots an arrow with the paper talisman towards the sky, ordering the curse to go back to its sender. The arrow, now on fire, lands in Dà Âson's secret lair, burning it to the ground. Dà Âson, swearing vengeance on Seimei, finally releases the spirit of Prince Sawara from its confinement in the burial mound. Sawara's ghost enters Dà Âson's body and summons a horde of vengeful spirits to attack Heian-kyà Â. Aone reveals to Seimei that he and Hiromasa are foretold by the stars to become the two protectors of the city: one cannot survive without the other. She, Seimei and Mitsumushi then go off in search of Hiromasa.
Dà Âson makes his way to the imperial palace. Hiromasa tries to stop him in his tracks, but he is no match for his superhuman abilities; he is mortally wounded when Dà Âson throws back an arrow Hiromasa shot towards him. Seimei and Aone find him, but it is too late. Aone suggests that Seimei resurrect Hiromasa by performing the rite of Taizan-fukun, the Chinese god of the dead (æ³°å±±åºÂÃ¥ÂÂ祠Taizan-fukun no matsuri), offering to sacrifice her immortality and life to do so.
Hiromasa, brought back to life by the ritual, and Seimei go to face DÃ Âson. Aone's spirit, speaking through Hiromasa's body, convinces Sawara to give up his hatred. While Sawara at first refuses to do so, he is finally moved by the prospect of being with Aone - who was the prince's lover during his lifetime - forever; he then passes peacefully with Aone into the afterlife. Although now without Sawara's spirit to empower him, DÃ Âson resumes the fight. Seimei, using his wits, traps DÃ Âson within a magical barrier. Finally admitting defeat, DÃ Âson slashes his throat with the sword from Sawara's burial mound.
At the end of the movie, Seimei and Hiromasa drink sake together in Seimei's house. Hiromasa teases Seimei for crying when he died and reflects on what Seimei said to him earlier: that the human heart can turn one into a demon or a buddha. Seimei tells Hiromasa that he is a 'very good man'; Hiromasa answers, "So are you." The two share a laugh together.
Onmyoji was released theatrically in Japan on October 6, 2001, where it was distributed by Toho. The film was a commercial success, grossing ÃÂ¥3,010,000,000 ($36,567,313) and becoming the fourth-highest earning Japanese production of 2001. The film was also giving a limited theater release in North America where it grossed $16,234 in three theaters.
It was released in the United States on April 18, 2003, under the title Onmyoji: The Yin Yang Master. It was followed by the sequel Onmyoji II in 2003.
The film won the awards for Best Sound Recording and the Mainichi Film Concours and Best Sound at the Japanese Academy Awards.