Passage Genesis 38:8–9
Genesis 38:8-9 tells how Judah told Onan to go in to his dead brother’s wife and raise up offspring for his brother, and how Onan, knowing the child would not be his, wasted his semen on the ground. This is the passage behind the word onanism. The argument lists it among the passages in which the Bible speaks of sexual matters very openly.
Then Judah said to Onan, “Go in to your brother’s wife and perform the duty of a brother-in-law to her, and raise up offspring for your brother.” But Onan knew that the offspring would not be his. So whenever he went in to his brother’s wife he would waste the semen on the ground, so as not to give offspring to his brother.
Genesis 38:8-9
Source: see Credits and references (no. 29, p. 26).