In traditional beliefs of Japan and in literature, onryō (怨霊, literally "vengeful spirit", sometimes rendered "wrathful spirit")refers to a ghost (yūrei) believed capable of causing harm in the world of the living, harming or killing enemies, or even causing natural disasters to exact vengeance to redress the wrongs it received while alive then takes their spirits from their dying bodies.
The term overlaps somewhat with goryō (御霊), except that in the cult of the goryō, the acting agent need not necessarily be a wrathful spirit.
Vengeance:
While the origin of onryō is unclear, belief in their existence can be traced back to the 8th century and was based on the idea that powerful and enraged souls of the dead could influence or harm the living people. The earliest onryō cult that developed was around Prince Nagaya who died in 729;and the first record of possession by the onryō spirit affecting the health is found in the chronicle Shoku Nihongi (797), which states that "Fujiwara Hirotsugu (藤原広嗣)'s soul harmed Genbō to death" (Hirotsugu having died in a failed insurrection, named the "Fujiwara no Hirotsugu Rebellion", after failing to remove his rival, the priest Genbō, from power).Traditionally in Japan, onryō driven by vengeance were thought capable of causing not only their enemy's death, as in the case of Hirotsugu's vengeful spirit held responsible for killing the priest Genbō), but causing natural disasters such as earthquakes, fires, storms, drought, famine and pestilence, as in the case of Prince Sawara's spirit embittered against his brother, the Emperor Kanmu.In common parlance, such vengeance exacted by supernatural beings or forces is termed tatari (祟り).
The Emperor Kanmu had accused his brother Sawara of plotting (possibly falsely to remove him as rival to the throne), and the latter who was exiled died by fasting. The reason that the Emperor moved the capital to Nagaoka-kyō thence to Kyoto was an attempt to avoid the wrath of his brother's spirit, according to a number of scholars.This not succeeding entirely, the emperor tried to lift the curse by appeasing his brother's ghost, by performing Buddhist rites to pay respect, and granting Prince Sawara the posthumous title of emperor.
A well-known example of appeasement of the onryō spirit is the case of Sugawara no Michizane, who had been politically disgraced and died in exile. Believed to cause the death of his calumniators in quick succession, as well as catastrophes (especially lightning damage), and the court tried to appease the wrathful spirit by restoring Michizane's old rank and position.[1] Michizane became deified in the cult of the Tenjin, with Tenman-gū shrines erected around him.