Who wrote Deuteronomy? G-d or Moses?
Bible critics insist that neither G-d nor Moses authored Deuteronomy. They posit that Deuteronomy was composed during the time of the first Temple period by King Josiah (640–609 B.C.E.), following the early second Temple period
by Ezra the Scribe. This may not be true.
Was the Pentateuch authored by G-d? The Babylonian Talmud, Megillah 31b, says that G-d wrote Leviticus while Moses wrote Deuteronomy, respectively. The Babylonian Talmud, Bava Bathra 88b, agrees that Moses composed Deuteronomy. It recalls that G-d blessed the Israelites with twenty-two letters and cursed them with eight. Moses reversed the numbers.
The Zohar to Vaethanan says that, “Deuteronomy was written by Moses himself." It was, essentially, “the oral law." Rabbi Judah Loew, agrees that Deuteronomy is Moses' wording. Abraham ibn Ezra felt that not all of scripture was composed by Moses (more on this later). Some of it was written later with “divine prophecy.” He explains that the Decalogue, or Ten Commandments, in Exodus was divine while Deuteronomy is Moses’ “explanation” of the Decalogue.
Nachmanides explains in his commentary to Deuteronomy that whenever Moses mentions the commands, he is issuing G-d's laws. However, when he repeats or explains the laws, he is presenting us with his own opinion. Isaac ben Joseph Caro, in his book Toledot Yitzhak, recalls the Mishnah Sanhedrin and the Babylonian Talmud, Sanhedrin 99a, which explains that Moses did not write Deuteronomy of his own initiative.
The Mishnah states:
“The following have no portion [in the world to come]....He who maintains that...the Torah was not divinely revealed.”
The Talmud elaborates:
“And even if he asserts that the entire Torah is from heaven, except for a particular verse, which [he insists] was not uttered by G-d but by Moses [he is deprived of the world to come].”
To reconcile this seemingly inconsistency, Caro wrote that the position of the Sanhedrin only applies to the first four Pentateuchal books. Yet he explains that Deuteronomy is Moses' explanation and that G-d insisted that he record them (Nachmanides).
Don Isaac Abravanel disagreed. He felt that every last letter, including Deuteronomy “comes from the mouth of the Almighty: G-d commanded that it be written word for word.”
Ibn Ezra’s “Secret of the Twelve”
In his commentary, Ibn Ezra addresses the question of whether or not Moses penned the entire Torah. The twelve verses of Deuteronomy chapter 34 inform us of Moses's death. Moses ascends Mount Nebo and peers over the promised land, the future land of Israel. After his death, Joshua succeeded him, and while no prophet, led the Jews to victory over Cannan. The problem is that the final 8 verses continue from Moses's death and aftermath.
In his introduction to Chelek, Maimonides lists thirteen fundamental principles of Judaism, one of them (the eighth) being the belief that Moses wrote the entire Torah. That we possess the same Torah that was given by G-d through Moses. However, Yeshayahu Leibowitz posists that Maimonides did not bealive in all of the 13 principles, writing them only for the masses.
Rashi quotes the Talmud, Bava Batra 15a and Menachot 30a, and Midrash Sifre, that it is possible that Moses wrote verse 5 and Joshua wrote the rest (Rabbi Yehuda or Rabbi Nehemiah). Rabbi Meyer disagreed, writing that “The Holy One, blessed be He, spoke, and Moses wrote with tears.” Yet, how can Moses write the remaining verses if Moses did not descend the mountain to report. The only plausible answer, perhaps, is that Joshua knew and wrote the remaining twelve passages through prophecy. This is reasonable and probably the most likely.
Ibn Ezra’s “secret of the twelve” can also refer to other Deuteronomy passages, such as
1:2. Josef Bonfils in his Zophnat Panei’ach, explains that Moses may not have written Deuteronomy 1:1, since it speaks of the “other side of the Jordan.” He also cites Deuteronomy 31:9, Deuteronomy 3:11, and Deuteronomy 27:1.
Baruch Spinoza, in his Tractatus Theologico-Publicus mentions ibn Ezra‘s “secret of the twelve,” where he insists that Ezra would agree with him, writing,
“From what has been said, it is clearer than the sun at noonday that the Pentateuch was not written by Moses, but by someone who lived long after
We have seen three possibilities regarding the authorship and authenticity of the Torah. One is atheistic, the view of Spinoza. The other is the more traditional view, that G-d communicated the Torah, including Deuteronomy. The final view (most likely) is that Moses wrote Deuteronomy, concluding with Joshua through prophecy.
Does the idea that Moses penned Deuteronomy eliminate the sanctity of the Torah? Or, is the wisdom of the Torah inspired by G-d? Indeed, Rabbi Joseph ben Eliezer of Saragossa said, “what difference is it to me if Moses wrote it or another prophet wrote it, since the words of them all are true and by prophecy?”
 Safenat Pa`neah, vol. I, pg. 91.22-92.8.