During the wilderness sojourns in preparation for entry into the Promised Land, the Lord commanded the people to "devote to destruction" the cities of the Canaanites and to drive them out of the land. The meaning of Herem (devote to destruction) in this case is that of holy war--the Lord is taking vengeance upon the Canaanite peoples for their long history of sinfulness (cf. Gen. 15:16 where the Lord explicitly tells Abraham that He is waiting until the transgression of the Amorites is complete before He punishes them). The purposes of Herem are several, but perhaps most acutely is the testimony they are to serve to the people; that the Lord God's wrath and curse is upon those things "under the ban" (herem). It is a negative call to repentance from rebellion and re-alliance with the Lord God, as Rahab would recognize (Josh. 2), and even as the Gibeonites (Josh. 9) would recognize.
Interestingly, there seems to be a negative example of herem in Judges 9. Gideon, or Jerubbaal ("let Baal contend") has recently defeated the Midianites who were oppressing Israel, but in his weakness Gideon sets up idolatry in his hometown by making an ephod out of the spoils taken from the Midianite kings and princes. Gideon also multiplied wives, one of which was a Shechemite, who bore Gideon a son, whom he named Abimelech ("son of the king"). Abimelech wasn't a full Israelite, and since Gideon had seventy other sons, it would have been near impossible for him to have any hopes of kingship within the land. So he entices the Shechemites to slough off the yoke of Gideon's seventy sons and accept the rule of Abimelech, their brother (or rather, only half-brother, as Gaal son of Ebed, "worthless son of a slave," will later point out).
It is Abimelech's means for ridding himself of his brothers that seems reminiscent of herem. The Shechemites give him seventy pieces of silver from the temple of Baal-Berith ("lord of the covenant"), which he uses to hire mercenaries to capture his brothers. Once captured, he seems to offer them as a sacrifice to Baal-Berith, for he slays them all on a rock at Ophrah--the same place where Gideon slew the kings of Midian as the Lord commanded, and where Gideon had set up his false religious worship. Then Abimelech is crowned king "beside the terebinth tree at the pillar that was in Shechem"--perhaps the same tree where God first appeared to Abram in Canaan and possibly where Jacob set up an altar to the Lord. So we have Abimelech resorting to the aid of a foreign god in order to destroy the sons of the Lord's anointed judge, and set himself up as the god's anointed king in place of YHWH of the Covenant. It would seem that there is a holy war between Baal-Berith and his people and YHWH-Berith and his people.
Of course the rest of the story plays out the fact that YWHW is the only one who has the power to accomplish His ends, as Abimelech destroys the temple of Baal-Berith in his destruction of the rebellious Shechemites, and then he is killed by a woman who drops an upper-millstone on his head at the tower in Thebez. Perhaps one reading of the narrative is that YHWH, the only true God and Holy One has the prerogative and power to enact herem on His enemies?