God explicitly forbids human sacrifice, but He commanded Abraham to offer Isaac. In response to Abraham’s obedience, God then commanded him not to offer Isaac, providing instead a ram. In the Yom Kippur liturgy, appeal is made to God for the forgiveness of our sins because of "the ashes of Isaac," as though he had been presented as a burnt offering.
In the extended Kedushah for the Yom Kippur Musaf service, we read: "Let there be an advocate for the ancient people... Our righteous Messiah is turned away from us; we shudder in horror, and there is no one to justify us. He carries the load of our iniquities and the yoke of our transgressions. And he is wounded because of our transgressions. He bears the heaviness of our sins on his shoulder, that he may find forgiveness for our iniquities. There is healing for us in his wound." (The Hebrew text can be found in The Complete Artscroll Machzor, Yom Kippur, Mesorah Publications, 1986, Pp. 827-828)
Much of this text is derived from Is. 53:5-12: "But he was wounded for our transgressions, bruised for our iniquities. The chastisement for our peace was upon him, and by his stripes we are healed. All we like sheep have gone astray; we have turned, every one, to his own way; and the Everpresent Lord has laid on him the iniquity of us all....
"He was taken away in humiliation and judgment, and who in his generation considered that he was cut off from the land of the living for the transgressions of My people; it was their plague. And they made his grave with the wicked, but with a rich man at his death; because he had done no violence, and no deceit in his mouth. Yet the Everpresent Lord desired to bruise him, to put him to grief.
"When You make his soul a guilt offering, he will see his seed, he will lenthen his days, and the desire of the Everpresent Lord will prosper in his hand. He will see the labor of his soul, and be satisfied. By his knowledge My righteous Servant will make many righteous, because he will carry their iniquities. Therefore I will give him a portion with the many, and he will divide the plunder with the strong because he emptied his soul unto death, and he was numbered with the transgressors, and he carried the sin of many, and interceded for the transgressors."
In this passage, which Tal. Sanhedrin 98b and the Targum also refer to Messiah, it is evident that the Everpresent Lord puts Messiah to death as a guilt offering for the sins and iniquity of the people. There are other passages in Tanakh which the Rabbis understood to indicate that the death of the righteous brings atonement for others.
God told Israel to set apart cities of refuge to which someone who accidentally killed another was to flee to escape vengeance. (Num. 35:6-34) When the high priest died, anyone who had committed manslaughter was free to return home from the cities of refuge. In some way, the death of the high priest put an end to the guilt of the one who had accidentally killed another.
In Tal. Makkot 11b, the question is raised as to whether atonement comes from the exile of the one who committed manslaughter or from the death of the high priest. R. Abaye says, "Do you think it is exile which atones? It is the death of the [high] priest which atones."
In Moed Katan 28a, "R. Ammi said, ‘Why is Miriam’s death [Num. 20:1] connected with the Torah portion about the red heifer? [Num. 19] This is to tell you that even as the red heifer atones, even so the death of the righteous atones.
"R. Eleazar said, ‘Why is Aaron’s death [Num. 20:26,28] connected with the priestly clothing? Even as the priestly clothing atones [Lev. 16:4,24,32,33], so the death of the righteous atones.’" (cf. Tal. Zevachim 88b)
"R. Hiyya b. Abba said, ‘The sons of Aaron died on the first of Nisan. Then why is their death remembered on Day of Atonement? This is to teach that as the Day of Atonement brings atonement, in the same way the death of the righteous brings atonement.... And from where do we know that the death of the righteous brings atonement? Because it is written, And they buried the bones of Saul [and Jonathan his son] (II Sam. 21:14), and it is then written, After that God was entreated for the land.’" (Mid. Leviticus Rabbah 20:12)
The Talmud speaks about the plague that came when King David numbered the people, connecting its end with the death of someone righteous. (Num. 24) R. Eleazar said that the plague ended because of the death of Abishai. "R. Eleazar said, ‘The Holy One, blessed be He, said to the [destroying] Angel: Take for Me a great man among them, that in him many debts can be paid for them.’ ...Samuel said, ‘He saw the ashes of Isaac [as though he had been sacrificed]’" (Tal. Berachot 62b)
There is also a case where the death of the wicked brings atonement. God commends Pinchas for putting to death Zimri and the Midianite woman he brought into his tent. Pinchas executed God’s judgment and "made atonement for the children of Israel". (Num. 25:13, cf. Tal.Sanhedrin 82b)
Rashi commented on the setting apart of the Levites (Num. 8:9) and the need for all Israel to lay hands on them: "Inasmuch as the Levites were given as an atoning sacrifice instead of them [the whole congregation], they [the people] are to come and stand by their offering and lay their hands on them [the Levites]."
King David committed adultery with Bathsheba, and then had her husband Uriah killed in battle. (2Sam. 11-12) When David confessed his sin and turned away from it, God forgave him and did not put him to death. But, as judgment on David’s sin, God put to death the innocent son of David, to whom Bathsheba had given birth.