The 10 commandments were given by God at Mt Sinai, but the Bible shows that these same commandments were known and in effect long before Moses or a people known as the Jews existed...
The idea that the 10 Commandments came into existence with the covenant at Mt Sinai and were thus terminated with it, cannot be true. Let’s notice the scriptural proof.
Genesis 13:13 tells us, “the men of Sodom were exceedingly wicked and sinful against the Lord.”
Sin is defined as “the transgression of the law” (1 John 3:4, KJV) or “lawlessness” (New King James Version, NIV). Therefore, “where there is no law there is no transgression” (Romans 4:15). This is clear. So do we find transgressions of the Ten Commandments described as sinful before Mt. Sinai? Clearly we do.
Long before the events at Mt Sinai, the people of Sodom were punished for being wicked and sinful. We conclude, therefore, that God had already made available the knowledge of what is sinful.
Here is another example. Genesis 20:3-9 and Genesis 39:7-9 describe adultery as “a great sin” and a “sin against God.” Adultery breaks the Seventh Commandment .
In Genesis 3:6-17, God punishes Adam and Eve for their coveting and stealing—breaking the Tenth and Eighth Commandments . They also dishonored Him as their parent, violating the Fifth Commandment .
In Genesis 4:9-12, God punishes Cain for murder and lying—violations of the Sixth and Ninth Commandments .
In Exodus 16:4, several days to several weeks before God established His covenant with the Israelites at Mt. Sinai, we find God giving them a test to see “whether they will walk in My law or not.” His test involved whether they would rest on the seventh-day Sabbath as He commanded in the Fourth Commandment of that law—with which they were at least partly familiar. The seventh day had been hallowed—set aside as holy by God—from the time of Adam and Eve (Genesis 2:1-3).
God’s reaction to their disobedience is revealing. He exclaims, “How long do you refuse to keep My commandments and My laws?” (Exodus 16:28). God clearly speaks of both His “commandments and … laws” as already existing and in force well before He listed the Ten Commandments verbally at Mt. Sinai, as described four chapters later! Therefore, the Ten Commandments were only codified —written in stone as part of a formal covenant—at Mt. Sinai. Scripture clearly shows that they existed and were in force well before then.
This is stated explicitly in Genesis 26:5, where God tells Isaac that He blessed his father Abraham “because Abraham obeyed My voice and kept My charge, My commandments, My statutes, and My laws.” This event took place centuries before the covenant at Mt. Sinai, centuries before Moses and two generations before Judah, head of the tribe that much later would become known as the Jews, was born! (Be sure to read “Did Abraham Keep the Same Commandments God Gave to Moses?” on page 13).
In Leviticus 18:21-27, God calls the idolatrous practices of the people of the land of Canaan “abominations”—actions so filthy and degrading that God compared their expulsion to being “vomited out” of the land (Leviticus 18:28). What was their sin? Among other things, idolatry (the worship of false gods) and human sacrifice, which violated the First, Second and Sixth Commandments .
The Bible shows that the Ten Commandments did not originate with Moses or in his time. Nor were they in any way limited only to the Jews. They were in effect and known long before Moses or a people known as the Jews existed. They are the foundation of God’s laws that show us how to love God (defined by the first four Commandments) and how to love our fellow man (defined by the last six).
This is why, after Jesus Christ returns to establish His glorious Kingdom on earth, Isaiah 2:3 tells us that “many people shall come and say, ‘Come, and let us go up to the mountain of the Lord, to the house of the God of Jacob; He will teach us His ways, and we shall walk in His paths.’ For out of Zion shall go forth the law, and the word of the Lord from Jerusalem.”
At that time, all of mankind will at last be taught to live according to all of God’s laws and commandments!
UCG Study Guide: The New Covenant: Does It Abolish God's Law?