Devarim 21:9

9 So shalt thou put away the guilt of dahm naki from among you, when thou shalt do that which is right in the sight of Hashem.

Devarim 21:9 Meaning and Commentary

Deuteronomy 21:9

So shalt thou put away the guilt of innocent blood from among
you
Which otherwise, the person not being found out, and brought to just punishment for it, would devolve upon the whole. Aben Ezra interprets it the punishment of innocent blood, which, by the above method being taken, would not be inflicted on them:

when thou shalt do that which is right in the sight of the Lord;
as it was to observe this law concerning the beheading of the heifer, with all the rites and ceremonies belonging to it here enjoined; as well as every other command, statute, and ordinance of the Lord, which are all right to be done, ( Psalms 19:8 ) .

Devarim 21:9 In-Context

7 And they shall answer and say, Yadeinu (our hands) are not guilty of shefach dahm (shedding blood), neither have our eyes seen it.
8 Kapper (atone), O Hashem, for Thy people Yisroel, whom Thou hast redeemed, and lay not dahm naki (innocent blood) unto the charge of Thy people Yisroel. And the shefach dahm shall be atoned for.
9 So shalt thou put away the guilt of dahm naki from among you, when thou shalt do that which is right in the sight of Hashem.
10 When thou goest forth to milchamah against thine enemies, and Hashem Eloheicha hath delivered them into thine hands, and thou hast taken them captive,
11 And seest among the captives an eshet yefat to’ar (a woman who is beautiful of form), and hast a desire unto her, that thou wouldest have her to be thy wife;
The Orthodox Jewish Bible fourth edition, OJB. Copyright 2002,2003,2008,2010, 2011 by Artists for Israel International. All rights reserved.