1 And it came to pass, when Jabin king of Hazor had heard those things, that he sent to Jobab king of Madon, to the king of Shimron, to the king Achshaph, 2 And to the kings who were on the north of the mountains, of the plains south of Cinneroth, in the valley, and in the borders of Dor on the west, 3 And to the Canaanite on the east and on the west, to the Amorite, the Hittite, the Perizzite, the Jebusite in the mountains, and to the Hivite under Hermon in the land of Mizpeh. 4 And they went out—they and all their hosts with them, many people, even as the sand that is upon the sea-shore in multitude, with horses and chariots very numerous. 5 And when all these kings met together, they came and encamped together at the waters of Merom, to fight against Israel.
6 And the LORD said to Joshua, "Do not be afraid because of them, for tomorrow about this time I will deliver them up all slain before Israel. You shall hamstring their horses and burn their chariots with fire." 7 So Joshua came, and all the people of war with him, against them by the waters of Merom suddenly, and they fell upon them. 8 And the LORD delivered them into the hand of Israel, who smote them and chased them to great Zidon, to Misrephoth-maim, and to the valley of Mizpeh eastward. And they smote them until they left to them no one remaining. 9 And Joshua did to them as the LORD told him: he hamstrung their horses and burnt their chariots with fire.
10 And Joshua at that time turned back, and took Hazor and smote its king with the sword, for Hazor formerly was the head of all those kingdoms. 11 And they smote all the souls who were in it with the edge of the sword, utterly destroying them. There was not any left to breathe. And he burnt Hazor with fire. 12 And all the cities of those kings, and all their kings, Joshua took and smote them with the edge of the sword, and he utterly destroyed them, as Moses the servant of the LORD commanded. 13 But as for the cities that stood still in their strength, Israel burned none of them, except Hazor only. Joshua burned that one. 14 And all the spoil of these cities and the cattle, the children of Israel took for plunder to themselves. But they smote every man with the edge of the sword until they had destroyed them, neither did they leave any who breathed. 15 As the LORD commanded Moses his servant, so Moses commanded Joshua. And Joshua did so. He left nothing undone of all that the LORD commanded Moses.
16 So Joshua took all that land, the hills, all the south country, all the land of Goshen, the valley, the plain, the mountain of Israel, and the valley of the same, 17 Even from the mount Halak that goes up to Seir, even to Baal-gad in the valley of Lebanon under mount Hermon. And all their kings he took, smote them, and slew them. 18 Joshua made war a long time with all those kings. 19 There was not a city that made peace with the children of Israel, except the Hivites the inhabitants of Gibeon. They took all in battle. 20 For it was of the LORD to harden their hearts to come against Israel in battle, so that he might utterly destroy them and that they might have no favor, but that he might destroy them, as the LORD commanded Moses.
21 And at that time Joshua came and cut off the Anakims from the mountains, from Hebron, from Debir, from Anab, from all the mountains of Judah, and from all the mountains of Israel. Joshua destroyed them utterly with their cities. 22 There was none of the Anakims left in the land of the children of Israel. Only in Gaza, in Gath, and in Ashdod some remained. 23 So Joshua took the whole land, according to all that the LORD said to Moses, and Joshua gave it for an inheritance to Israel according to their divisions by their tribes. And the land rested from war.
[v.15] - "Moses commanded Joshua" - Reference, Deuteronomy 31:7.
[v.19] - Reference, Joshua, ch. 9, specifically verse 15.
[v.23] - "according to all that the LORD said to Moses" - Reference, Deuteronomy 7:1-2. See also, Numbers 33:50-53.