The Bible is inerrant, so we can be confident that there are no true contradictions in the original manuscripts. Yet some have tried to state that the Bible erroneously records 20 commandments instead of 10. The claim is that God wrote the Ten Commandments, and Moses wrote ten more. In this case, however, there is not even a contradiction between Exodus 20 and 34, nor are there two sets of ten commandments which are different in content. Here are the key verses from Exodus 34.
God says He will write on the tablets of stone the Ten Commandments again:
And the Lord said to Moses, "Cut two tablets of stone like the first ones, and I will write on these tablets the words that were on the first tablets which you broke. So be ready in the morning, and come up in the morning to Mount Sinai, and present yourself to Me there on the top of the mountain. And no man shall come up with you, and let no man be seen throughout all the mountain; let neither flocks nor herds feed before that mountain." So he cut two tablets of stone like the first ones. Then Moses rose early in the morning and went up Mount Sinai, as the Lord had commanded him; and he took in his hand the two tablets of stone. (Exodus 34:1–4)
God commands Moses to write down a list of rules:
Then the Lord said to Moses, "Write these words, for according to the tenor of these words I have made a covenant with you and with Israel." So he was there with the Lord forty days and forty nights; he neither ate bread nor drank water. And He wrote on the tablets the words of the covenant, the Ten Commandments. Now it was so, when Moses came down from Mount Sinai (and the two tablets of the Testimony were in Moses’ hand when he came down from the mountain), that Moses did not know that the skin of his face shone while he talked with Him. (Exodus 34:27–29)
In Exodus 34:5–26, God gave Moses commandments that he was to write down verbatim. These commandments were to not make treaties with the inhabitants of Canaan, and to destroy their idols and groves. God also commands Moses to tell the people to keep the sacred feasts that He established. These commandments are not, nor were they supposed to be the same as the "ten words" or Decalogue. This is evident by the use of the phrase “these words” in verse 27, which refers back to the instructions in the previous verses. The Ten Commandments were then written by God on the tablets for the second time (Exodus 34:28; Deuteronomy 10:2-4).
There is no contradiction here. The only problem is that the antecedent to the pronoun he is ambiguous in the second half of verse 28. Therefore, some have tried to force a contradiction here by claiming that it was Moses and not God who wrote the second set of ten commandments. Remember that it was God who wrote the first set, and Moses broke them in anger (Exodus 31:18, 32:15–16, 32:19). Although in Exodus 34:28 the antecedent is unclear, other passages make it clear that God also who wrote the second set of tablets containing ten commandments.
When dealing with Scripture, it is a hermeneutical principle that the unclear passages should be interpreted by the clear passages, and when this procedure is followed it should erase any supposed contradiction in these verses. In Exodus 34:1 states, God told Moses, “
Cut for yourself two tablets of stone like the first, and I will write on the tablets the words that were on the first tablets, which you broke.” So God stated that He would be the One to write on the tablets that Moses was supposed to cut.
In Deuteronomy, Moses recounts these details to the assembly. He mentioned that God gave him the first set of tablets (Deuteronomy 5:22, 9:10–11; cf. Exodus 31:17–18), which he subsequently broke when he came down from the mountain (Deuteronomy 9:15–17). After talking about his period of fasting and pleading with God not to destroy the people, Moses told the people about the second set of tablets.
At that time the Lord said to me, “Hew for yourself two tablets of stone like the first, and come up to Me on the mountain and make yourself an ark of wood. And I will write on the tablets the words that were on the first tablets, which you broke; and you shall put them in the ark.”
So I made an ark of acacia wood, hewed two tablets of stone like the first, and went up the mountain, having the two tablets in my hand. And He wrote on the tablets according to the first writing, the Ten Commandments, which the Lord had spoken to you in the mountain from the midst of the fire in the day of the assembly; and the Lord gave them to me. Then I turned and came down from the mountain, and put the tablets in the ark which I had made; and there they are, just as the Lord commanded me. (Deuteronomy 10:1–5)
It is clear then from these passages that it was God who wrote the Ten Commandments or “ten words” on the tablets of stone, and that these Ten Commandments were the same which God had written previously. Therefore, the unclear antecedent (“he”) in Exodus 34:28 is made clear, and that clarity shows that God is the author of the Ten Commandments, written on tablets of stone by His own finger. The phrase “these words” in Exodus 34:27 refer back to the words which God spoke unto Moses in Exodus 34:6–26 and which Moses wrote down per God’s command.