Classical Taoist philosophy and spiritualism, which first arose in China about 600 BC, was eventually organized into a formal religion by Chang Tao-ling in the later half of the second century AD. From this formalization of Tao (the "Way") came a creation myth, P'an Ku, which blended Taoist principles with an earlier, nameless tradition of Chinese nature-worship. The myth explains the paradox of nature integrating seemingly incompatible things.
The P'an Ku creation myth dates from the third century AD. It tells the story of a cosmic egg that contained chaos, where all opposites were intermixed--hot and cold, man and woman, night and day--yin and yang. This is the fundamental Taoist principle of duality. Yin is the female standard of darkness, potentiality, and regression; Yang is the male standard of light, activity, and progress.
P'an Ku, the "First Man," was centered in the intermixed yin-yang. When the time was right, P'an Ku broke out as a giant, and began separating the egg's contents into opposites. He created the Earth from the heavier yin, and the sky from the lighter yang. As P'an Ku grew taller, the sky was pushed higher and higher away from the earth. With a hammer and chisel, he made lakes, rivers, mountains, and valleys. He placed the sun, moon, and stars in the sky. All this was accomplished from a divine knowledge of yin-yang. When the giant P'an Ku finally died after 18,000 years, humans were formed from the fleas that sprang from his head.
The P'an Ku myth hasn't endured as accepted Taoist doctrine, but it made an important contribution to articulating the Yin and Yang principles of the harmonious interplay of all pairs of opposites in the universe.