Onanism
From wipipedia.org

Onanism is a term usually used to mean masturbation and sometimes coitus interruptus.
It derives from the character Onan in the Bible (Genesis 38 verse 9) who spilled his seed on the ground.