Answer
Dear Brohter,
it’s haram to do masturbation by your hands (only masturbation with wife hands is allowed)
see the following fatwas
The prohibition of masturbation (shafi school)
Answered by Shaykh Amjad Rasheed
Since contemporary physicians say that masturbation is not harmful to the body, and since things are originally permissible, what is the wisdom behind prohibiting masturbation? Is there a spiritual harm in it?
Masturbation with one’s own hand, rather than the hand of one’s wife, is unlawful. As Imam ash-Shafi‘i noted, the evidence for the prohibition of masturbation is the word of Allah Most High:
“ …those who guard their private parts, save from their wives or [bondwomen] whom their right hands own, for these are not blameworthy. But whoever seeks beyond that, those are the transgressors.” (23:5-7)
Masturbation is included in the words of Allah Most High, “beyond that.” The great Hadith scholar, Abdullah al-Ghumari, compiled the evidences for the prohibition of Masturbation in a small book entitled, “ al-Istiqsa’ li Adellati Tahreem il-Istimna’ .”
Whether Masturbation is harmful or not is left to medical doctors to decide. If they say it is harmful, they will emphasize the prohibition of masturbation. If they say it is not harmful, the prohibition will remain in effect. This because the evidence for the prohibition of masturbation is the aforementioned verse whose ruling remains valid. Moreover, the harmfulness to the body is not the basis of the prohibition such that masturbation will be considered unlawful only if it is harmful. Rather, when the ruling of something is confirmed by a reliable evidence as is the present question, it does not matter whether we know the wisdom behind that particular ruling. Although the wisdom behind certain Divine rulings can be concluded, some rulings merely exist to be followed [not to be understood]. This is a general, essential rule that every believer should acknowledge.
As for the question whether masturbation with one’s own hand is spiritually harmful or not, the answer is yes; it is. The sacred law closed all the doors leading to the enormity of fornication, which violates one of the Shari‘a’s great objectives, namely; the protection of parentage and honor. The harder one trains oneself to become god-fearing and break the sexual desire by lowering one’s gaze, leaving masturbation, and avoiding afflictions such as listening to obscene language, the farther he becomes from fornication. But if one gives oneself a free reign to approach fornication by doing the aforementioned, it will be easy for him to fall into it and he would not be able to refrain from it. Thus, the prohibition of masturbation is a means to break the desire of the Nafs (self) and keep it away from fornication. For if one develops the habit of masturbation, one would not be satisfied with it and he would soon seek what is beyond it. The wisdom of the prohibition of masturbation thus appears in spite of the some doctor’s claim it is not harmful to the body.
Amjad Rasheed
(Translated by Abu Muhammad Rahil)
What is the ruling on Masturbation?
Walaikum assalam,
Masturbation is sinful, being prohibitively disliked, and having many personal and societal ill-effects that are known and recognised in sane traditional societies and by balanced people the world over. The early Muslims used to say, “The one who weds his hand is accursed.” (Fath al-Qadir)
It is only allowed in the very rare situation where if the person did not do this, they would fall into actual zina (i.e. unlawful sexual intercourse), because of their uncontrollable desire, on condition that they are unable to marry and have taken all reasonable means to lessen their passion (such as fasting, lowering their gaze, avoiding meat and dairy products, avoiding those things that stir their desires, such as bad company, spending unnecessary time outdoors, especially in public places such as shopping malls where there is fitna, avoiding watching tv and surfing the internet, etc).
Even in such cases, it could only be done to lessen sexual desire, not for sexual gratification. Otherwise, it would remain sinful. These conditions are extremely rare.
[derived from: Ibn Abidin’s Hashiya, al-Lakhnawi’s Naf` al-Mufti wa’l Sa’il, and al-Nahlawi’s Durar al-Mubaha, Kamal ibn al-Humam’s Fath al-Qadir]
Wassalam,
Faraz Rabbani
I look at women frequently, which throws me into masturbation. I try to repent but I return to unlawful looking. What should I do?
I ask Allah, the All-Generous, to pave for you and for all of us the way of obedience and the way of refraining from disobedience. Allah willing, both ways will be made easy through sincerely seeking them.
To begin with, I advise you to remind yourself of the greatness of your Lord whom you disobey, and to make known to your nafs (self) that looking at the opposite sex is a vain lust followed by regret and loss, and that the unlawful look is an arrow (that strikes) into the believer’s heart.
You should strive to stay away from the places where unlawful looking is made easy for you. It is also recommended that you keep the company of a righteous brother when moving about who will help you do the good until you get rid of that which tires you. Furthermore, you should make Dhikr (remembrance) of Allah at all your states.
The teacher of the good – may Allah bless him and give him peace – guided us to the medicine of unlawful looking, namely, marriage. Hasten to it if you can. Otherwise, adhere to fasting. Allah willing, marriage or fast should solve the problem. The Prophet- blessings and peace be upon him- said: “Oh, young men! Whosoever is able should marry, for it lowers the gaze and protects the private parts and whosoever is unable should fast for it is a protection” (Sahih al-Bukhari).
Eating less (or no) fat, meat and dairy products is also of the things which help one lower one’s gaze. For eating these foods contribute to stimulate the sexual desire.
Finally, make lots of du‘a (prayer) and you will succeed. May Allah undertake our guidance.
Amjad Rasheed
(Translated by Abu Muhammad Rahil)

As a web site owner I believe the subject matter here is reallywonderful. I appreciate it for your hard work. You should keep it up forever! Best of luck.