The two Gods, Izanami and Izanagi, were asked to create new land by the spirits. So, they plunged a spear into the ocean, and a drop of water formed the first island of Japan. There, Izanami gave birth to the rest of the islands as well as the Gods.
Izanami died giving birth to the God of fire. Izanagi went to the land of the dead, to bring her back, but she didn't come. when Izanagi came back, he brought impurities with him, which are responsible for human wrongdoing.
Izanami and Izanagi's first grandson, Jimmu, became the first emperor of Japan, establishing a monarchy of his descendants.