The notion of hereditary guilt runs throughout the Bible and was a common characteristic of most ancient societies.
Exodus 20:5, for example, claims from the mouth of Yahweh himself that he is a jealous god, “reckoning fathers’ sins upon sons, on the third and on the fourth generation.”
This theology of inherited sin is duplicated in the Deuteronomic version of the Ten Commandments (Deut 5:9), and is prominent throughout the Deuteronomic History. It was also cited to provide the theological response as to why Jerusalem fell (Lam 5:7), and it permeates the book of Daniel, with its repetitive refrain, “the sins of our fathers.”
Yet other textual sources negate this theology of inherited sin, or at any rate draw it into question, such as we find in Jeremiah 31:29-30 and Ezekiel 18:2-4.
After explaining theologically the fall of Jerusalem on account of the sins of the fathers, Jer 31:29-30 imagines an ideal restitution wherein “all shall die for their own sins”—rather than nations falling for the sins of their fathers is the point.
More explicitly, another Deuteronomic scribe writes the following: “Fathers shall not be put to death for sons, and sons shall not be put to death for fathers. They shall each be put to death through his own sin” (Deut 24:16). Although this particular verse may have been created to counter any idea that capital offenses could be ransomed or payed for by another, it nevertheless stipulates against the idea of hereditary guilt, which seems to have been the normative view in many of the Bible’s texts.
Finally, this contradiction can be extended into the New Testament, where much of the literature also talks about an individual’s responsibility for his own sins. At core these differences are a reflection of the changing worldview and beliefs of the 70+ authors who wrote the texts of the Bible which span a 1,000 years.