Matthew 12:25 says that a house divided against itself cannot stand, and Canaan was truly a land divided. Each city was its own kingdom, with its own king. And they all feuded with each other. Their religious worship included fertility and blatant immoral sexual practices such as bestiality and homosexuality. To add to their wickedness, the Canaanites regularly practiced child sacrifice to appease the fertility gods. These people may have appeared as indestructible giants in the eyes of the 10 spies sent by Moses 40 years before, but because of their debauched society as a whole, the entire land was perched for conquest.
For this reason, God made tremendous emphasis on obedience. Righteous living promoted unity among the Israelites, and also with God. This was the only way they were going to survive going up against such a wicked nation. It was the responsibility of Joshua, the newly appointed leader, to keep the laws of God before him. God commanded Joshua: "This Book of the Law shall not depart from your mouth, but you shall meditate in it day and night, that you may observe to do according to all that is written in it. For then you will make your way prosperous, and then you will have good success." (Joshua 1:8) This charge to Joshua sets the stage for the entire book. The success of the Israelites in claiming the Promised Land depended on it.
Throughout the book of Joshua, there are several incredible accounts of God moving in both miraculous and mysterious ways. As the feet of the priests carrying the Ark of the Covenant stepped into the overflowing Jordan River, the waters suddenly parted and all of Israel crossed over on dry ground. Upon crossing, Jericho was the first city they reached. After the Israelite army marched around Jericho for six days, and then seven times on the seventh day, they blasted their horns and the seemingly impenetrable walls crumbled to the ground. One Canaanite woman, along with her family, was spared from the destruction, because of her faith in the God of heaven and earth. (See Rahab)
The sin of Achan from the tribe of Judah nearly brought Israel to its knees. After Jericho, the Israelites attempted to conquer the city of Ai, but were shamefully defeated. The loss came as a shock after the incredible victory over Jericho. But it was discovered that someone among the tribes had sinned. God had instructed that no spoils be taken from Jericho, but Achan had stolen a garment, 200 shekels of silver, and a wedge of gold, and hidden them beneath his tent. As a punishment for his sin, he and his sons and daughters were stoned to death, all of their possessions were burned, and then everything was buried beneath a mound of stones. God was serious about absolute obedience and wanted to make sure the Israelites understood just how serious He was.
The Israelites conquered 33 kings throughout their campaign as recorded in the book. But as Joshua comes to a close, it is evident that there is still more land to take. Despite this, each of the tribes were given their portion of land, with the command that they finish driving out all of the Canaanites. Unfortunately, this did not take place. The Israelites were already falling into idol worship.
In the opening chapter of Joshua, God instructed Joshua not to turn to the right hand or to the left, but to keep His commands. In chapter 23, verse 6, Joshua in turn instructs the people to not turn to the right hand or to the left, but to keep God's commands. The Israelites were like sheep without a shepherd, and just as Moses attempted to point them in the right direction before his death, Joshua also endeavored to give them clear orders just before his death.
After he commanded the Israelites to choose between God and the foreign gods of Canaan, Joshua died, leaving them to attempt to carry out their feeble promise to serve the living God. This is where the book of Judges begins.