Deuteronomy 31

2 Moses had completed the final section of his life. He knew that his time was short, so he spent it establishing Joshua as the new leader and encouraging Israel. Moses had desired relief for his people from Egyptian oppression eighty years before. The last forty years he had patiently led them through the wilderness. He would not see it, but he knew that God would give the people the land and the freedom that He had promised them. This made Moses' heart content and helped him encourage the people the way he did. Moses had lost his temper and dishonored God at Kadesh. In doing so, he was disqualified from leading Israel into the Promised Land (Num 20:1-13).
3 Moses makes it clear that God would lead them and defeat their enemies. Joshua would be their human leader as they fought, but he also makes it clear that God is the one who would give them victory.
4 The Israelites were to be encouraged by the past victories that God had given them (Deu 2:26-3:11).
5 Moses' commands to destroy the current inhabitants came from God, so the Israelites were to obey the strictly.
6 When we are obeying God's commands, we have no need to be afraid. God's purposes will be accomplished through those who are faithful to Him.
7 God encourages Joshua to be strong and courageous. He could be strong because God strengthened him. He could be courageous because God would always be with him and would fulfill His promises.
9 Moses wrote the Law, that is, the first five books of the Bible, and entrusted its keeping to the priests. At least some of this was likely dictated to a scribe. This section was probably written by the scribe to record what happened after Moses had completed his own written work.
12 Paper, parchment, books, and scrolls were all rare and expensive. Thus, the common person did not have access to the written words of Moses. The Law was entrusted to the priests, and at appointed times, they were to read the law to the people during the Feast of Tabernacles to remind them of what the Law said. They would remember to fear (i.e., reverence) God because of the miracles recorded there. They would also learn what God's requirements were to avoid sin.

The Law was for all people to hear and obey. God does not exclude women and children from the requirements of knowing and obeying the Law. This also implies that their personal relationship to Him is just as important as that for men.

13 God knows the importance of beginning a child's training while he is young. Those brought up knowing God's requirements are more likely to continue in them. The hope is that as they are raised knowing the requirements of God that they will develop their own personal relationship with Him.
14 God told Moses that his death was near. God called both the old and new leader together to listen to Him. What he was about to say was important for both of them to hear. The transfer of leadership from Moses to Joshua was to be smooth and uninterrupted.
15 God had been present in the pillar of cloud and fire for forty years. As was His custom, He appeared in the pillar at the tabernacle whenever He spoke with Moses.
16 The Israelites had learned obedience under the leadership of Moses, but that leadership would end. Israel would continue in obedience under Joshua, but once he had died, Israel would become disobedient (Josh 24:31). Throughout the rest of their history, they would only be obedient under strong and godly leadership.

Christians today can benefit from strong and faithful leadership, but we must remember that Jesus is our ultimate leader. We are not dependent on human leaders for salvation and proper motivation; we are dependent on God. Our Christian fellowship is designed to encourage and correct us in our relationship with Jesus, but it is not to take the place of His direct leadership. If we place too much emphasis of human leadership, then we will struggle just as Israel did.

17 This kind of statement puzzles many people. If God can see that these bad things are going to happen, can He not prevent them? Is the all-powerful God not able to control His people? Indeed, God could control us, but the basis for our relationship would then be military rule, not love. Love is a choice, and in order for us to choose to love God, we must also have to option not to love Him. God already knows that most people will choose not to love Him. Regrettably, when they reject God, they cut themselves off from the source of everything that is good and loving. They will often suffer the consequences during this lifetime, but the worst consequence will come when they are completely cut off from God in the afterlife.
19 Music is a powerful medium because it helps us to remember words, and remember them exactly. Many of us can still sing songs we learned as children. This song was intended for young and old alike to remind them continually of what God had done for them and what He expected from them.
21 The song will be a witness against them because they did not do what they were supposed to do, although they knew better. An example for the United States is our Pledge of Allegiance. In it we recite, "... one nation under God..." but we, as a whole, seem less and less concerned with the things of God as time goes on. Thus, our pledge is a witness against us when we are not the nation under God that we promised to be.
23 Moses had said that Joshua would lead the people, and God officially confirmed it. The time came then for the official change of leadership to take place. God reiterates Moses' exhortation to be strong and courageous. This would apparently be Joshua's greatest challenge as he led the Israelites into the Promised Land.