This story is from the Kojiki, the Japanese "Record of Ancient Things". The Kojiki was compiled in the 500s to 700s A.D., at the direction of various emperors intent on standardizing and preserving Japan's mythic history. The Kojiki does not tell the story of the origin of the world and its peoples per se, but it is the story of the origin of Japan and of Japan's aristocratic families.
When heaven and earth began, three deities came into being, The Spirit Master of the Center of Heaven, The August Wondrously Producing Spirit, and the Divine Wondrously Producing Ancestor. These three were invisible. The earth was young then, and land floated like oil, and from it reed shoots sprouted. From these reeds came two more deities. After them, five or six pairs of deities came into being, and the last of these were Izanagi and Izanami, whose names mean "The Male Who Invites" and "The Female who Invites".
The first five deities commanded Izanagi and Izanami to make and solidify the land of Japan, and they gave the young pair a jeweled spear. Standing on the Floating Bridge of Heaven, they dipped it in the ocean brine and stirred. They pulled out the spear, and the brine that dripped of it formed an island to which they descended. On this island they built a palace for their wedding and a great column to the heavens.
Izanami examined her body and found that one place had not grown, and she told this to Izanagi, who replied that his body was well-formed but that one place had grown to excess. He proposed that he place his excess in her place that was not complete and that in doing so they would make new land. They agreed to walk around the pillar and meet behind it to do this. When they arrive behind the pillar, she greeted him by saying "What a fine young man", and he responded by greeting her with "What a fine young woman". They procreated and gave birth to a leech-child, which they put in a basket and let float away. Then they gave birth to a floating island, which likewise they did not recognize as one of their children.
Disappointed by their failures in procreation, they returned to Heaven and consulted the deities there. The deities explained that the cause of their difficulties was that the female had spoken first when they met to procreate. Izanagi and Izanami returned to their island and again met behind the heavenly pillar. When they met, he said, "What a fine young woman," and she said "What a fine young man". They mated and gave birth to the eight main islands of Japan and six minor islands. Then they gave birth to a variety of deities to inhabit those islands, including the sea deity, the deity of the sea-straits, and the deities of the rivers, winds, trees, and mountains. Last, Izanami gave birth to the fire deity, and her genitals were so burned that she died.
Izanagi grieved over Izanami, and a deity was born from his tears. Distraught after burying Izanami, he used his long sword to behead his son, the deity of fire, whose birth had killed Izanami. From the blood on the sword came three deities of rocks, two deities of fire, and one of water, all of which are needed to make a sword. Eight more deities arose from the body of Izanagi and Izanami's slain son.
Izanagi still longed for Izanami, and he went to the underworld in search of her. Finding her in the darkness, he called to her and asked her to come back to the land of the living with him. She promised him that she would go ask the gods of the underworld, but she begged him to not look at her as she did so. She was gone long, however, and eventually he broke off the end of a comb in his hair and set it afire for a light. He found her body with maggots consuming it, and these maggots were the eight deities of thunder. Ashamed to be seen in this condition, Izanami chased Izanagi out of the underworld. First she sent the thunder deities after him, and then she herself pursued him. At last he grasped a huge rock and used it to close the passage to the underworld. Enraged, she shouted to him that she would each day strangle one thousand people of Japan. He responded that if she did so, he would each day cause fifteen hundred Japanese people to be born. This is why fifteen hundred children are born each day and one thousand people die each day.
Izanagi returned to his home and bathed to purify himself after this terrible experience. As he disrobed, new deities arose from his clothing, and more arose from the water as he bathed. Three of these were ancestors of Japanese families. The last of the deities was a son, Susa-nš-wo, who became the deity of the sea. He was eventually exiled to earth for his behavior in the heavens, but he and his sister, the Goddess of the Sun, parented eight deities. Among these was the ancestor of Yamato family that ruled Japan, and two others were ancestors of nineteen of its highest families.
When the deities had pacified the land, the Goddess of the Sun dispatched Japan's first ruler from the heavens to the earth. Descending from the Floating Bridge of Heaven to the mountain tops, he built his palace. Eventually he met a beautiful young woman, Princess Brilliant Blossoms, and asked her to marry him. She deferred to her father's judgment, and her father gave him both Princess Brilliant Blossoms and her older sister, Princess Long as the Rocks. The new emperor refused the older sister, however, because of her ugliness. When the father heard this, he explained that he had offered Princess Long as the Rocks because her children would have lived eternally. Instead, the children of Princess Brilliant Blossoms were mortal, which is why the emperors have never had long lives.
Princess Brilliant Blossoms was soon with child, so soon that the emperor could hardly believe that she bore his children. To prove herself, she built a palace and shut herself in it and set fire to it, knowing as he did that the children of anyone but the emperor could not survive the flames. Amidst the flames she gave birth to three deities, and ultimately their descendants were the imperial family of Japan.
Donald L. Philippi, trans., 1969, Kojiki: Princeton, Princeton University Press, 655 p., and Joseph M. Campbell, 1962, The Masks of God: Oriental Mythology: New York, Viking Press, 561 p.