Genesis 38:8-10
One site I checked mentions that the sin that Onan committed was violating the Levirate law. This is from GotQuestions.org:8 Then Judah said to Onan, “Sleep with your brother’s wife and fulfill your duty to her as a brother-in-law to raise up offspring for your brother.� 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
A Catholic website mentions that violating the Levirate Law was not the problem since such violation was not punishable by death. Instead the sin was not fulfilling the function of sexual intercourse - which is to procreate.Is onanism a sin? The true crime of Onan was refusing to sire a son on his brother’s behalf, which doesn’t really apply to modern culture, anyway.
I believe Onan violated the Levirate Law. He also engaged in deception by leading his wife and father to believe that he would impregnate his wife while he had no intentions to do so. Did God step in for one or both reasons or some other reason?
What do you guys think? What was Onan's sin?