Reference: I’laam al-Mu’aasireen bi-Fataawa Ibn ‘Uthaymeen – Page 184
Question: What is the ruling regarding masturbation?
Response: Onanism is masturbation with the hand – which is prohibited; It is obligatory upon all Muslims to take precaution against it, because doing it is contrary to the statement of Allaah (‘Azza wa Jall):
In addition to that which exists in masturbation of much [health-related] harm.
And Allaah is the Expounder of All Success.