14 And Jehovah said to Moses, Lo, the days are near for thee to die; call Joshua, and present yourselves at the tent of meeting, that I may give him a charge. And Moses and Joshua went and presented themselves at the tent of meeting. 15 And Jehovah appeared at the tent in the pillar of cloud; and the pillar of cloud stood over the entrance to the tent. 16 And Jehovah said to Moses, Behold, thou shalt sleep with thy fathers; and this people will rise up, and go a whoring after the strange gods of the land into which they enter, and will forsake me, and break my covenant which I have made with them. 17 And my anger shall be kindled against them in that day, and I will forsake them, and I will hide my face from them, and they shall be devoured, and many evils and troubles shall befall them, and they will say in that day, Have not these evils befallen me because my God is not in my midst? 18 And I will entirely hide my face in that day for all the evils that they have wrought, because they turned unto other gods. 19 And now, write ye this song, and teach it to the children of Israel; put it in their mouths, that this song may be a witness for me against the children of Israel. 20 For I shall bring them into the land which I swore unto their fathers, which floweth with milk and honey; and they will eat and fill themselves, and wax fat, and will turn unto other gods, and serve them, and despise me, and break my covenant. 21 And it shall come to pass, when many evils and troubles have befallen them, that this song shall testify against them as a witness; for it shall not be forgotten out of the mouths of their seed; for I know their imagination which they are forming already this day, before I bring them into the land which I have sworn [unto them].

22 And Moses wrote this song the same day, and taught it to the children of Israel.

Matthew Henry's Commentary on Deuteronomy 31:14-22

Commentary on Deuteronomy 31:14-22

(Read Deuteronomy 31:14-22)

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.