Bible Notes Online - Deuteronomy 21 - ESV
Commentary

v1-9: The unsolved murder would bring guilt upon the land. The people had to make atonement. Although the people would claim innocence, they could not avoid their responsibility before God.

v10-17: The problems of favouritism and unfairness; we are not to mistreat others, but treat all fairly.

An Israelite man could marry a woman taken captive in war. If things did not work out, he could let her go; elsewhere this is due to the hardness of the human heart (Mark 10.5). But the man could not mistreat her.

Similarly, where a man has two wives, and sons by them both, the true first born must inherit first. Both Isaac and Elkanah faced this issue. Again, to have two wives was certainly not ideal, and again an indication of a hard heart, seeking something other than God's best.

v18-21: Where a person is persistently rebellious there was severe punishment. See also 19.20, where such punishment was also a deterrent to others. The parents of the rebellious son had responsibility to bring the situation to the elders of the city.