Here, I. The charge is given to Joshua, which God has said (Deut. 31:14) he would give him. The same in effect that Moses had given him. The same in effect that Moses had given him (Deut. 31:7): Be strong and of a good courage, Deut. 31:23. Joshua had now heard from God so much of the wickedness of the people whom he was to have the conduct of as could not but be a discouragement to him: “Nay,” says God, “how bad soever they are, thou shalt go through thy understanding, for I will be with thee. Thou shalt put them into possession of Canaan. If they afterwards by their sin throw themselves out of it again, that will be no fault of thine, nor any dishonour to thee, therefore be of good courage.”
II. The solemn delivery of the book of the law to the Levites, to be deposited in the side of the ark, is here again related (Deut. 31:24-26), of which before, Deut. 31:9. Only they are here directed where to treasure up this precious original, not in the ark (there only the two tables were preserved), but in another box by the side of the ark. It is probable that this was the very book that was found in the house of the Lord (having been somehow or other misplaced) in the days of Josiah (2 Chron. 34:14), and so perhaps the following words here, that it may be a witness against thee, may particularly point at that event, which happened so long after; for the finding of this very book occasioned the public reading of it by Josiah himself, for a witness against a people who were then almost ripe for their ruin by the Babylonians.
III. The song which follows in the next chapter is here delivered to Moses, and by him to the people. He wrote it first (Deut. 31:22), as the Spirit of God indited it, and then spoke it in the ears of all the congregation (Deut. 31:30), and taught it to them (Deut. 31:22), that is, gave out copies of it, and ordered the people to learn it by heart. It was delivered by word of mouth first, and afterwards in writing, to the elders and officers, as the representatives of their respective tribes (Deut. 31:28), by them to be transmitted to their several families and households. It was delivered to them with a solemn appeal to heaven and earth concerning the fair warning which was given them by it of the fatal consequences of their apostasy from God, and with a declaration of the little joy and little hope Moses had in and concerning them. 1. He declares what little joy he had had of them while he was with them, Deut. 31:27. It is not in a passion that he says, I know thy rebellion (as once he said unadvisedly, Hear now, you rebels), but it is the result of a long acquaintance with them: you have been rebellious against the Lord. Their rebellions against himself he makes no mention of: these he had long since forgiven and forgotten; but they must be made to hear of their rebellions against God, that they may be ever repented of and never repeated. 2. What little hopes he had of them now that he was leaving them. From what God had now said to him (Deut. 31:16) more than from his own experience of them, though that was discouraging enough, he tells them (Deut. 31:29), I know that after my death you will utterly corrupt yourselves. Many a sad thought, no doubt, it occasioned to this good man, to foresee the apostasy and ruin of a people he had taken so much pains with, in order to them good and make them happy; but this was his comfort, that he had done his duty, and that God would be glorified, if not in their settlement, yet in their dispersion. Thus our Lord Jesus, a little before his death, foretold the rise of false Christs and false prophets (Matt. 24:24), notwithstanding which, and all the apostasies of the latter times, we may be confident that the gates of hell shall not prevail against the church, for the foundation of God stands sure.