14 Then the Lord said to Moses , "Behold , the time for you to die is near ; call Joshua , and present yourselves at the tent of meeting , that I may commission him." So Moses and Joshua went and presented themselves at the tent of meeting . 15 The Lord appeared in the tent in a pillar of cloud , and the pillar of cloud stood at the doorway of the tent . 16 The Lord said to Moses , "Behold , you are about to lie down with your fathers ; and this people will arise and play the harlot with the strange gods of the land , into the midst of which they are going , and will forsake Me and break My covenant which I have made with them. 17 " Then My anger will be kindled against them in that day , and I will forsake them and hide My face from them, and they will be consumed , and many evils and troubles will come upon them; so that they will say in that day , ' Is it not because e our God is not among us that these evils have come upon us?' 18 "But I will surely hide My face in that day because of all the evil which they will do , for they will turn to other gods . 19 "Now therefore, write this song for yourselves, and teach it to the sons of Israel ; put it on their lips , so that this song may be a witness for Me against the sons of Israel . 20 " For when I bring them into the land flowing with milk and honey , which I swore to their fathers , and they have eaten and are satisfied and become prosperous , then they will turn to other gods and serve them, and spurn Me and break My covenant . 21 "Then it shall come about, when many evils and troubles have come upon them, that this song will testify before them as a witness (for it shall not be forgotten from the lips of their descendants ); for I know their intent which they are developing today , before I have brought them into the land which I swore ."

22 So Moses wrote this song the same day , and taught it to the sons 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.