The elimination of the Midianites causes us a little confusion.
Numbers 31 says that it was the “Midianites” who enticed Israel into immorality at Peor. But Numbers 25 says it was “Moabite” women. To add to the confusion, Midian was a son of Abraham and Keturah, but the Old Testament also refers to “Midianites” as descendants of Ishmael, the son of Abraham and Hagar. Moses’ father-in-law lived in Midian and was a Midianite priest, but he is called a “Kenite.”
It’s probably best to identify the Midianites as a subset of a variety of peoples, perhaps distinguished from others by some facet (unknown to us) of their lives (dress, morality, religion, government or perhaps a combination of these). In any case, they were an identifiable people to the Israelites.
The Midianites were not exterminated. They do live on in Old Testament history (oppressing Israel during the time of the Judges – see Judges 7-8).
Christians usually have a tough time with the story of Numbers 25. But we ought to remember that the Midianites attempted to turn God against His own people by leading them into sin God found abominable. It was an attempt to use God’s own law against God Himself and it did result in the death of thousands of Israelites. The punishment of the Midianites should remind us of the seriousness of sin, and particularly life-threatening hazard of trying to “play” God.