The words of Pirkei Avot are well known – that Moshe received the Torah at Sinai and passed it on to Yehoshua (Avot 1:1).
But the Talmud presents us with a seemingly different tradition.
“We have been taught: How was the ‘Mishna‘ organized? Moshe learned straight from HaShem. Aharon then came in and Moshe taught him the passage. Aharon then moved over and sat on Moshe’s right side. His sons came in and Moshe taught them. When the sons left, Elazar sat on Moshe’s right side, and Itamar sat to the left of Aharon. The elders came in, and Moshe taught them. The elders then left and the entire nation came in and Moshe taught them. Thus, Aharon heard the passage four times, his sons three times, the elders twice, and the rest of the nation once. Then Moshe would leave and Aharon would review what he had learned. Aharon left, and his sons taught the people. They left, and the elders taught the people. Thus, everybody heard the material four times.” (Eruvin 54b)
According to this description, the Torah was handed down by the Kohanim and the elders. Not by Yehoshua!
A reasonable answer to this dilemma is to differentiate between two types of Torah – the Written and the Oral Torah.
The purpose of the Oral Torah – which in the above passage from the Talmud is called “Mishna” – is to teach us the practical aspects of how we are meant to behave in this world.
This is studied using our ancient tools for deriving the practical laws from the Torah, and not by a simple reading of the text. Such study requires a stable institution which can settle questions that are in doubt, a function that is performed by the Kohanim and the elders.
The Written Torah, on the other hand, teaches the ethical values at the foundation of the Torah, and this can be derived directly from the text, even if it is not directly related to the law. An example of this is the law pertaining to a person who injures someone else’s eye – the Written Torah indicates what he deserves in principal, to lose his own eye, while the Oral Torah teaches us the actual practical laws of payment for damages.
The person in charge of passing on the ethical aspects of the Torah is the melekh, who reads the Torah “so that he will learn to fear his G-d” (D’varim 17:19), and who in practice follows the Written Torah in guiding the nation (see the Netziv on D’varim 24:16).
This chain of events is clear from Parshat Vayeilekh.
“And Moshe called out to Yehoshua, and he said to him… Be strong and have courage, for you will go with this nation to the land.” (D’varim 31:7)
It would seem that Yehoshua was only given military and political leadership. And immediately afterwards, it is written, “Moshe wrote down this Torah and gave it to the Kohanim, the sons of Levi… and to all the elders of Israel” (31:9).
This corresponds to the Talmud in Eruvin quoted above, where we explicitly see that Yehoshua did not participate in passing the Torah from one generation to the next. But the next verses immediately tell us something else.
“And Moshe commanded them, saying, at the end of seven years… read this Torah in front of all of Israel.” (31:10-11)
The command to “read” is in the singular and not in the plural. This means that Moshe was talking directly to Yehoshua, who remained standing there with him, as the one who would transmit the Torah to the people at the gathering of “Hak’hel” – “so that they will learn and fear HaShem your G-d” (31:12).
Yehoshua had an additional role as the man who would pass down the ethical and moral context of the Torah, as described in Pirkei Avot.

