Misogiharae is a word combined by misogi (purification ceremony) and harae (exorcism).
Misogi and harae were originally different ceremonies. However, it is believed that they were regarded as a synonym in the period of "the Kojiki (Records of Ancient Matters) and the Nihonshoki (Chronicles of Japan)," because they were both acts of removing sins and impurities which the Shintoism considered to be taboo for the purification of a pure mind and body.
Misogi is conducted commonly on those who serve Shinto rituals when they have come into contact with an impurity. Harae is generally conducted on those who have produced a cause of impurity by committing Amatsu tsumi (heavenly sins) and Kunitsu tsumi (earthly sins).
In later years the ritual of Oharae (the great purification) was established in which emperors themselves go through a purification ceremony to remove the impurity of the entire nation.