What he did was wicked in the sight of the LORD, so He put Onan to death as well.
Cross References
Genesis 46:12The sons of Judah: Er, Onan, Shelah, Perez, and Zerah; but Er and Onan died in the land of Canaan. The sons of Perez: Hezron and Hamul.
Numbers 26:19The sons of Judah were Er and Onan, but they died in the land of Canaan.
Treasury of Scripture
And the thing which he did displeased the LORD: why he slew him also.
displeased.
Numbers 11:1
And when the people complained, it displeased the LORD: and the LORD heard it; and his anger was kindled; and the fire of the LORD burnt among them, and consumed them that were in the uttermost parts of the camp.
Numbers 22:34
And Balaam said unto the angel of the LORD, I have sinned; for I knew not that thou stoodest in the way against me: now therefore, if it displease thee, I will get me back again.
2 Samuel 11:27
And when the mourning was past, David sent and fetched her to his house, and she became his wife, and bare him a son. But the thing that David had done displeased the LORD.
him also.
Genesis 46:12
And the sons of Judah; Er, and Onan, and Shelah, and Pharez, and Zerah: but Er and Onan died in the land of Canaan. And the sons of Pharez were Hezron and Hamul.
Numbers 26:19
The sons of Judah were Er and Onan: and Er and Onan died in the land of Canaan.