On this, the last day of his life, Moshe goes from tent to tent throughout the camp, bidding farewell to his beloved people, encouraging them to keep the faith. Moshe tells them that whether he is among them or not, Hashem is with them and will vanquish their enemies. Then he summons Yehoshua, and, in front of all the people, exhorts him to be strong and courageous as the leader of the Jewish People. In this manner, he strengthens Yehoshua's status as the new leader. Moshe teaches them the mitzvah of Hakhel: That every seven years on the first day of the intermediate days of Succot, the entire nation, including small children, will gather together at the Temple to hear the king read from the Book of Devarim. The sections that he reads deal with faithfulness to Hashem, the covenant, and reward and punishment.
Hashem tells Moshe that Moshe’s end is near, and that he should therefore summon Yehoshua to stand with him in the Mishkan, where Hashem will teach Yehoshua. Hashem then tells Moshe and Yehoshua that after entering the Land, the people will be unfaithful to Him, and begin to worship other gods. Hashem will then completely hide His face, so that it will seem that the Jewish People are at the mercy of fate, and that they will be hunted by all. Hashem instructs Moshe and Yehoshua to write down a song — Ha'azinu — which will serve as a witness against the Jewish People when they sin. Moshe records the song in writing and teaches it to the Jewish People.
Moshe completes his transcription of the Torah and instructs the Levi'im to place it to the side of the Aron (Holy Ark), so that no one will ever write a new Torah scroll that is different from the original — for there will always be a reference copy.