Let me quote some examples of how the law was supposed to work:
Eze 18:20-23
20 The soul who sins is the one who will die. ... 21 But if the wicked man turns from all the sins he has committed, keeps all My
statutes, and does what is just and right, he will surely live; he
will not die. 22 None of the transgressions he has committed will
be held against him. Because of the righteousness he has practiced, he
will live. 23 Do I take any pleasure in the death of the wicked?
declares the Lord GOD. Wouldn’t I prefer that he turn from his ways
and live?
2 Sam 12:9-13 (David and Nathan)
9 Why then have you [David] despised the command of the LORD by doing evil in His sight? You put Uriah the Hittite to the sword and
took his wife as your own, for you have slain him with the sword of
the Ammonites. 10 Now, therefore, the sword will never depart from
your house, because you have despised Me and have taken the wife of
Uriah the Hittite to be your own.’ ...
13 Then David said to Nathan, “I have sinned against the LORD.”
“The LORD has taken away your sin,” Nathan replied. “You will not
die."
Ps 51:3, 4
For I know my transgressions, and my sin is always before me. Against
You, You only, have I sinned and done what is evil in Your sight, so
that You may be proved right when You speak and blameless when You
judge.
Dan 9:18
For we are not presenting our petitions before You because of our
righteous acts, but because of Your great compassion.
2 Sam 24:14
David answered Gad, “I am deeply distressed. Please, let us fall into
the hand of the LORD, for His mercies are great; but do not let me
fall into the hands of men.”
Acts 2:36-38
Therefore let all Israel know with certainty that God has made this
Jesus, whom you crucified, both Lord and Christ!” When the people
heard this, they were cut to the heart and asked Peter and the other
apostles, “Brothers, what shall we do?” Peter replied, “Repent and be
baptized, every one of you, in the name of Jesus Christ for the
forgiveness of your sins, and you will receive the gift of the Holy
Spirit.
One could also quote the example of other murderers such as the apostle Paul himself (1 Tim 1:12-16) and many more.