Onan was the second son of Judah by the daughter of Shua. He died before Jacob’s family went down into Egypt.
Onan’s conduct toward Tamar was described as evil in the eyes of the Lord, and God judged him with death. His account is connected with the family duty described in relation to a deceased brother’s wife.
The supplied material places his death before the migration of Jacob’s family to Egypt and records him in Judah’s genealogies.