This is the Preamble to the U.S. Constitution.
Exodus 20:1-2 is the preamble to the Ten Commandments.
1. God the Lawgiver (Exodus 20:1)
There are clear examples of commandment-breaking earlier in Exodus. The ten plagues God visited on Pharaoh were a direct punishment for Egypt’s idolatry, which violated the first and second commandments (Num. 33:4). Moses’ own personal exodus was occasioned by his violation of the sixth commandment (Exod. 2:11–15). At the burning bush God taught Moses to honor his name (Exod. 3:1–15), very much in keeping with the third commandment. God revealed the Sabbath principle of the fourth commandment by giving manna six days out of seven, and those who failed to follow the appropriate instructions suffered for their disobedience (Exod. 16). So at various points the exodus presupposed the existence of God’s law, even before the Israelites reached Mount Sinai.
We find the same principle at work in the book of Genesis, which contains many stories about people breaking God’s law. Noah’s son Ham was cursed for dishonoring his father (Gen. 9:18–27). Cain was condemned as a murderer (Gen. 4:10–12), the Sodomites as adulterers (Gen. 19:24, 25), Rachel as a thief (Gen. 31:19–32), Abraham as a liar (Gen. 20), and Lot’s wife as a covetous woman (Gen. 19). God had always dealt with people on the basis of his law. Certain commandments had been revealed to them, and if they were written nowhere else, they were written on the tablets of their hearts (see Rom. 2:14, 15).
God’s moral law went all the way back to the Garden of Eden, where (in addition to various other commands concerning sexuality, rest, and work) God told Adam and Eve not to eat from the tree of the knowledge of good and evil. Theologians argue about whether or not our first parents also knew any of the Ten Commandments. The Bible simply doesn’t say. But whether or not God revealed any of its specific commands, Adam and Eve were ruled by its basic principles: love for God and love for one another. They were obligated to honor one another, to preserve life, and to tell the truth—the kind of conduct later mandated on Mount Sinai. And in their first sin, Adam and Eve managed to violate nearly all ten of God’s basic rules. Taking the forbidden fruit was a theft, stimulated by a covetous desire, based on a lie about God’s character. Eating it was a way of having another god. It was also tantamount to murder because it led to the death of the entire human race. From the beginning our first parents were bound by the basic principles of what theologians call the “law of creation” or “the law of nature.”