Complete Commentary on the Whole Bible, by Matthew Henry, at sacred-texts.com
(Deu 31:1-8) Moses encourages the people, and Joshua.
(Deu 31:9-13) The law to be read every seventh year.
(Deu 31:14-22) The Israelites' apostasy foretold, A song given to be witness against them.
(Deu 31:22-30) The law delivered to the Levites.
Moses assures Israel of the constant presence of God with them. This is applied by the apostle to all God's spiritual Israel, to encourage their faith and hope; unto us is this gospel preached, as well as unto them; he will never fail thee, nor forsake thee, Heb 13:5. Moses commends Joshua to them for a leader; one whose wisdom, and courage, and affection they had long known; one whom God had appointed to be their leader; and therefore would own and bless. Joshua is well pleased to be admonished by Moses to be strong and of good courage. Those shall speed well, who have God with them; therefore they ought to be of good courage. Through God let us do valiantly, for through him we shall do victoriously; if we resist the devil, he will flee from us.
Though we read the word in private, we must not think it needless to hear it read in public. This solemn reading of the law must be done in the year of release. The year of release was typical of gospel grace, which is called the acceptable year of the Lord; for our pardon and liberty by Christ, engage us to keep his commandments. It must be read to all Israel, men, women, children, and to the strangers. It is the will of God that all people should acquaint themselves with his word. It is a rule to all, therefore should be read to all. Whoever has read of the pains taken by many persons to get scraps of the Scriptures, when a whole copy could not be obtained, or safely possessed, will see how thankful we should be for the thousands of copies amongst us. They will also understand the very different situation in which the Israelites were placed for many ages. But the heart of man is so careless, that all will be found too little, to keep up a knowledge of the truths, precepts, and worship of God.
Moses and Joshua attended the Divine Majesty at the door of the tabernacle. Moses is told again that he must shortly die; even those who are most ready and willing to die, need to be often reminded of its coming. The Lord tells Moses, that, after his death, the covenant he had taken so much pains to make between Israel and their God, would certainly be broken. Israel would forsake Him; then God would forsake Israel. Justly does he cast those off who so unjustly cast him off. Moses is directed to deliver them a song, which should remain a standing testimony for God, as faithful to them in giving them warning, and against them, as persons false to themselves in not taking the warning. The word of God is a discerner of the thoughts and intents of men's hearts, and meets them by reproofs and correction. Ministers who preach the word, know not the imaginations of men; but God, whose word it is, knows perfectly.
The solemn delivery of the book of the law to the Levites, to be deposited in, or rather by the side, of the ark, is again related. The song which follows in the next chapter is delivered to Moses, and by him to the people. He wrote it first, as the Holy Spirit taught him; and then spake it in the hearing of all the people. Moses tells them plainly, I know that after my death ye will utterly corrupt yourselves. Many a sad thought, no doubt, it occasioned to this good man; but his comfort was, that he had done his duty, and that God would be glorified in their dispersion, if not in their settlement, for the foundation of God stands sure.