From Japanese Shinto mythology there was a giant serpent-dragon with eight heads and eight tails named Yamata no Orochi (八岐の大蛇) and a storm god named Susanoo (須佐之男).
When Susanoo was exiled from the heavens due to a dispute with his sister Amaterasu (天照), the Shinto goddess of Sun, he happened upon an elderly couple who were crying by the river. When asked why they were crying, they explained that every year for the past seven years, the serpent-dragon Orochi comes to devour one of their daughters, and this year they have to give up their eighth and final daughter.
Susanoo decides to save their daughter and fight Orochi under the condition that she marries him, to which the elderly couple accepts. Susanoo then transforms the daughter into a comb to safekeep her in his hair (Japanese mythology ftw). He then orders the parents to brew sake and refine it eight times. They must also build an enclosure with eight gates, each of which includes a vat of sake.
When the Orochi arrives, he is lured in towards the sake, and dips each of his heads into one of the vats. The drunken beast is now weakened and disoriented, allowing Susano to quickly slay it. As Susano cuts the monster into pieces, he uncovers a great sword that had grown inside the Orochi. This blade, the Kusanagi, is presented to Amaterasu as a gift to reconcile their dispute.