According to an old tradition, not only Genesis (also called the first book of Moses), but the whole Pentateuch (from Greek pente – five and teuchos – container for scrolls) were written by Moses. As far as Exodus to Deuteronomy is concerned, Moses was an eyewitness and partly even main character.
When writing Genesis, apart from direct revelations of God (for example the report on the creation of the world in Genesis 1; Genesis 2), he could possibly have referred to documents from the time of the patriarchs (for example the genealogies of Genesis 5:10-11 ,36).
Under the direction of the Holy Spirit of God Moses wrote everything down.As he was a prophet, the words of 2 Peter 1:21 apply to him as well:”Holy men of God spake under the power of the Holy Spirit.”
Moses lived around 1500-1400 BC. The highly developed hieroglyphic writing existed already in Egypt, as its origins can be traced back to 3000 BC.The Sumerian pictograms and the Assyrian-Babylonian cuneiform also date back that far.
The Akkadian-Sumerian and Assyrian-Babylonian”creation and flood myths” (for example the “Gilgamesh-Epic”) have often been compared with the corresponding reports of the Bible, and are often considered to be their “template”.But these human poetic writings, full of various “gods”, are in great contrast to the simple, clear words of Holy Scripture.
But they do show that these heathen peoples kept a small memory of the beginnings of the world which, in their imagination and under the influence of their idolatry, they wrote down in the form we have today.
The worship of snakes, which was, and still is, spread in many idolatrous cultures in the whole world, is another example of how Satan succeeded in getting people to turn away from worshipping the one true God and draw them after himself (compare Genesis 3:1, Revelation 12:9).