After the ten brothers put Joseph in a pit, a group of Midianite traders happened along and took Joseph to Egypt where he was sold to Potiphar. That ill-intentioned act was the first link in a series of events that saved all of Egypt from famine as well as the Children of Israel.
The Midianites were the descendants of Midian, the fourth of the six sons of Keturah who Abraham married after Sarah passed away (Genesis 25:1–2).
The Bible describes them as occupying the territory east of the Jordan River and the Dead Sea, and southward through the desert wilderness of the Aravah. It seems clear from the Biblical narrative, both before and after the Exodus, that their territory extended into the Sinai Peninsula. Later, in the period of the Israelite monarchy, Midian seems to have occupied a tract of land between Edom and Paran, on the way to Egypt (I Kings 11:18).
Midian again played a prominent role in guiding the Children of Israel by hosting Moses in his 40-year exile from Egypt. It is in Midian that God appeared to Moses in the Burning Bush. Moses married Zipporah, the daughter of the Midianite priest, Jethro. And Jethro advised Moses on establishing a system of delegated legal decision-making (Exodus 18).
But despite Moses’ years dwelling among the Midianites, they took on a negative role after the Exodus. The Midianites, along with the Moabites, attempted to bring the Israelites to worship Baal Peor. A Midianite princess named Cozbi seduced Zimri, the son of a Simeonite chief, kindling the anger of Phinehas. Later, Midian aligned with Moab against the Hebrews when Balak hired Balaam to curse them after the Exodus from Egypt (Numbers 22:4).
Moses directed that the Israelites should not harass the Moabites on their way towards the Land of Israel (Deuteronomy 2:9), but God’s ire was greater towards Midian than Moab. God later commanded the Children of Israel to wage war against the Midianites (Numbers 31) but not against Moab. Each of the five Midianite tribes was governed by its own king, but they all acted together against their common enemy, Israel. The Israelites killed all the Midianite men, including the five kings, as well as the sorcerer Balaam. According to verse 49, the Israelites themselves suffered zero casualties. All Midianite towns and camps were burnt, but this was not deemed to be enough of a slaughter. Moses asked, “Have you allowed all the women to live?” He then ordered that all the older women be put to death, together with all of the boys, leaving only the virgin girls alive to become wives of the Israelite soldiers.
The slaughter of the Midianites in the times of the Exodus was not as complete as the narrative makes it seem. The Midianites appear during the time of the Judges, oppressing Israel for seven years (Judges 6) until Gideon defeated Midian’s armies. The Midianites were so powerful in the region of the Tribe of Manasseh that the Israelites there were forced to abandon their fields and take shelter in mountain clefts, caves, and strongholds. Together with the Edomite tribe of the Amalekites, they harassed the Israelites as far to the west as the Philistine city of Gaza, reducing them to extreme poverty (Judges 6:1–6).
But not all of the Midianites were enemies. The Midianite clan known as the Kenites, the descendants of Jethro, were allied with the Israelites and eventually merged with the Tribe of Judah. The heroine of the Book of Judges, Yael, was the wife of a Kenite who lived among the Israelites (Judges 5:24).
Yael lured the Canaanite commander Sisera into her tent and assassinated him in his sleep.
Isaiah speaks of camels from Midian and Ephah coming to “cover your land”, along with the gold and frankincense from Sheba, during the time of the ultimate redemption (Isaiah 60).
Archaeologists have suggested that Midianites were involved in the mining operations in Timna in southern Israel, attributing to them a sophisticated culture and relatively advanced level of technology. The Midianites have been tentatively connected by some scholars with the remnants of the Hyksos, who once ruled Egypt but were later driven out and made their home in the desert. They have also been identified with the people whom the Egyptians called the Shasu.