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 to ensure that he would not have a child.