Historical commentary by Matthew Henry. The wording and interpretations below belong to the original source.
Here is, I. A law concerning murder. He had lately said, Thou shalt not kill; here he provides, 1. For the punishing of wilful murder ( v. 12 ): He that smiteth a man, whether upon a sudden passion or in malice prepense, so that he die, the government must take care that the murderer be put to death, according to that ancient law ( Gen. ix. 6 ), Whoso sheddeth man's blood, by man shall his blood be shed. God, who by his providence gives and maintains life, thus by his law protects it; so that mercy shown to a wilful murderer is real cruelty to all mankind besides: such a one, God here says, shall be taken even from his altar ( v. 14 ), to which he might flee for protection; and, if God will not shelter him, let him flee to the pit, and let no man stay him. 2. For the relief of such as killed by accident, per infortunium—by misfortune, or chance-medley, as our law expresses it, when a man, in doing a lawful act, without intent of hurt to any, happens to kill another, or, as it is here described, God delivers him into his hand; for nothing comes to pass by chance; what seems to us purely casual is ordered by the divine Providence, for wise and holy ends secret to us. In this case God provided cities of refuge for the protection of those whose infelicity it was, but not their fault, to occasion the death of another, v. 13 . With us, who know no avengers of blood but the magistrates, the law itself is a sufficient sanctuary for those whose minds are innocent, though their hands are guilty, and there needs no other.
II. Concerning rebellious children. It is here made a capital crime, to be punished with death, for children either, 1. To strike their parents ( v. 15 ) so as either to draw blood or to make the place struck black and blue. Or, 2. To curse their parents ( v. 17 ), if they profaned any name of God in doing it, as the rabbies say. Note, The undutiful behaviour of children towards their parents is a very great provocation to God our common Father; and, if men do not punish it, he will. Those are perfectly lost to all virtue, and abandoned to all wickedness, that have broken through the bonds of filial reverence and duty to such a degree as in word or action to abuse their own parents. What yoke will those bear that have shaken off this? Let children take heed of entertaining in their minds any such thought or passions towards their parents as savour of undutifulness and contempt; for the righteous God searches the heart.