Genesis 38:8-10

8 Then Judah said to Er's brother Onan, "Go and sleep with your brother's widow. Fulfill your obligation to her as her husband's brother, so that your brother may have descendants."
9 But Onan knew that the children would not belong to him, so when he had intercourse with his brother's widow, he let the semen spill on the ground, so that there would be no children for his brother.
10 What he did displeased the Lord, and the Lord killed him also.

Genesis 38:8-10 Meaning and Commentary

INTRODUCTION TO GENESIS 38

This chapter is wholly taken up with matters relating to Judah, the fourth son of Jacob, from whom the Jews have their name, and from whom Christ sprung: it treats of his marriage with a Canaanitess, his children by her, their character and end, Ge 38:1-11; of his incest with his daughter-in-law, though unknown by him, Ge 38:12-23; of his resentment against her, when he heard she was with child, and his confusion when he found it was by himself, Ge 38:24-26; and of the birth of twins by her, named Pharez and Zarah, Ge 38:27-30.

Scripture taken from the Good News Translation - Second Edition, Copyright 1992 by American Bible Society. Used by Permission.