Genesis 38:8

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.”

Read Genesis 38:8 Using Other Translations

And Judah said unto Onan, Go in unto thy brother's wife, and marry her, and raise up seed to thy brother.
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."
Then Judah said to Er’s brother Onan, “Go and marry Tamar, as our law requires of the brother of a man who has died. You must produce an heir for your brother.”

What does Genesis 38:8 mean?

John Gill's Exposition of the Bible
Genesis 38:8

And Judah said unto Onan
Some time after his brother's death: go in unto thy brother's wife, and marry her;
Moses here uses a word not common for marriage, but which was peculiar to the marrying of a brother's wife according to a law given in his time: it appears to have been a custom before, and which the patriarch might be directed to by the Lord, in such a case when a brother died, and left no issue, for the sake of multiplication of seed, according to the divine promise, and which in the time of Moses passed into a law, see ( Deuteronomy 25:5 ) ; and raise up seed unto thy brother;
that might bear his name, and enjoy his inheritance. For this law or custom was partly political, to continue the paternal inheritance in the family, and partly typical, to direct to Christ the firstborn among many brethren, ( Romans 8:29 ) , who in all things was to have the preeminence, ( Colossians 1:18 ) ; and this was not taken from the Canaanites, among whom Judah now was, but from the ancient patriarchs, which they had no doubt from divine revelation, and was taught in the school of Shem, and handed down from father to son; for as to this being a law among the Egyptians in later times, and which continued to the days of Zeno Augustus F17, it is most likely they took it from the Jews.


FOOTNOTES:

F17 Justinian. Cod l. 5. tit. 6. leg. 8.
California - Do Not Sell My Personal Information  California - CCPA Notice