2 Kings 14:6
But the children of the murderers he slew not: according unto that which is written in the book of the law of Moses, wherein the LORD commanded, saying, The fathers shall not be put to death for the children, nor the children be put to death for the fathers; but every man shall be put to death for his own sin.
2 Kings 14:6 falls within the account of Amaziah's reign, which began well but ended wickedly. When Amaziah put to death the servants who had murdered his father, he did not punish their children but spared them. He acted in this way in keeping with what was written in the book of the law of Moses.
The rule he followed was that children shall not be put to death for the fathers' sins. Every man shall be put to death for his own sin, and each person is accountable for his or her own sin and not for a parent's sin.
The same rule holds in the other direction, that fathers shall not be put to death for the children's sins. No one was to be executed for the sin of a parent or of a child.