The I Ching was originally an oral tradition passed on from Fu Hsi, the legendary sage of antiquity who is estimated to have lived around 3300 BC. How long the I Ching was in existence before Fu Hsi is not known.
Astrology, as it is known in the West, originated in Mesopotamia in the 2nd century BC. This was really the beginning of horoscopy and the divisions of the heavens into 12 sections. However the belief and use of astrology goes back much longer than that.
The I Ching represents the early versions of astrology in what is now known as China, around 3,300 BC. In these times there was the heavens above, the earth below, and man in between. The heavens were light with the images of stars and the moving lights. The earth could be firm or yielding beneath our feet, and man was active or passive, creative or receptive.
Guidance for man while living in the darkness of the earth, naturally came from the heavenly lights. The I Ching was used to express this heavenly guidance, whereby many might be able to lift his energies to the level of the Divine.