Genesis 38:9-10 states that
9 But Onan knew that the child would not be his; so whenever he slept with his brother’s wife, he spilled his semen on the ground to keep from providing offspring for his brother. 10 What he did was wicked in the Lord’s sight; so the Lord put him to death also.
This text is often brought up in the context of masturbation. Here, it is argued, is a passage that clearly shows that someone is being punished for committing the sin of masturbation. Onan did something that was so “wicked in the Lord’s sight” that the Lord responded in such a drastic way that Onan was put to death! Think about it: how many times is a person’s sin so egregious that God himself puts that person to death? You’ll find that there are not that many.
So do we have a clear biblical passage showing that masturbation is clearly a sin?
Probably not. And here’s why. First of all, Onan was not performing the act of masturbation on is own – his sister-in-law was right there with him. Thus, if this act is a sin then any sexual conduct in the conduct of marriage that does not result in semen going “where it should” would be considered wicked and worthy of punishment. Let’s not open that can of worms for the moment. More importantly, though, the entire point of the passage is that Onan is trying to manipulate the process of which of his wives will give birth to the heir. We do not see in this passage an example of someone seeking sexual gratification through masturbation, but someone attempting to circumvent the will and command of God.
For both of these reasons, it seems unlikely that the sin committed by Onan was masturbation itself – but rather the much graver evil of attempting to manipulate God’s sovereignty. Let’s look at Adam Clarke’s commentary surrounding this passage:
Verse 9: “Onan knew that the seed should not be his.” That is, that the child begotten of his brother’s widow should be reckoned as the child of his deceased brother, and his name, though the real father of it, should not appear in the genealogical tables.
Verse 10: “Wherefore he slew him also.” The sin of Onan has generally been supposed to be self-pollution; but this is certainly a mistake; his crime was his refusal to raise up seed to his brother, and rather than do it, by the act mentioned above, he rendered himself incapable of it. We find from this history that long be fore the Mosaic law it was an established custom, probably founded on a Divine precept, that if a man died childless his brother was to take his wife, and the children produced by this second marriage were considered as the children of the first husband, and in consequence inherited his possessions.
As stated by Clarke, and in light of the above reasoning, the idea that Onan’s sin was “self-pollution” or the act of masturbation itself must be “certainly a mistake.”