In the beginning, there was Arceus, who ruled the between spaces. Finding itself alone in the world, it brought forth an egg, and from it were born the jewel, the sword, and the mirror: the mirror Uxie of knowledge, who was omniscient, the jewel Mesprit of emotion, who was omnipresent, and the sword Azelf of will, who was omnipotent. They are you, me, and us. Arceus looked upon the three and they combined their might among them to craft the three places. The world between spaces, where alternate dimensions were to be born, the Reverse World, which served as the foundation of spaces, and the world in which the physical bodies of the universe manifested themselves.
Arceus created again, crafting the three dragons, Palkia of time, Dialga of space, and Giratina, who represents the Reverse World. It placed Palkia and Dialga in the between space and Giratina in the Reverse World before seeding the world with land, sea, and sky.
Hooh was given the sky to watch over, and in turn, it spread its wings over the heavens. To create the sea, it made Kyogre, to spawn the rising waters, and made Lugia to watch over them. To craft the land, it brought forth Groudon, and set forth Rayquaza to watch over the both of them, that neither were taken over by excess and that their battles did not destroy the land.
Lugia spawned the three legendary birds, Articuno, Moltres, and Zapdos, to watch over the weather of the world. Being the protector of the balance of nature, Lugia set about sequestering itself away from much of the world, that it might remain impartial in its storms and its sunny days.
Soon, however, Arceus saw the land swarming with humanity and investigated it, finding the land covered with animals of every sort, who were being hunted by humanity. Seeking out a village, its mere presence caused storms and winds so great they tore the villages it discovered to pieces, and in time, it came to be hunted by humans.
A single human warrior sought out Arceus, and they battled for many days until neither could come to a true victory. The human proposed a deal with Arceus; he would tell his fellows to no longer hunt it, and it would repair the damage it had done. Arceus agreed, and the man promptly lost Arceus' name and presence to history, and in return, Arceus spread upon the world the entities Mew and Ditto, who spilled over the land, who multiplied and spread even into the sea and sky, becoming all manner of creatures and plants to fill the void of life. Arceus then fell into an eternal slumber, and has not since awakened.
The grew under the gaze of humanity, trading with them and forming societies of their own until a cataclysm befell the sacred beasts. An illness spread among them, threatening their very life, and even the great gods became ill. Threatened with extinction, the beasts prepared to never again grace the world with their presence, settling down to rest for an eternity. Humanity, however, had grown swiftly, going from tribal beasts to builders of cities in naught but a few centuries. They came to the sacred beasts and aided them out of compassion for fellow intelligent beings.
Restored to vigor and life, the sacred beasts presented themselves to the humans who had aided them and swore to always appear before all those who would seek out their aid, though they must repeat the actions that brought them to aid the sacred beasts, or else defeat them in combat, like the ancient warrior who wielded a sword against Arceus.