Responses to specious arguments about the prohibition on masturbation (the bad habit)
Question

                I hope you could tell me some definitive evidence for the prohibition on masturbation, because of all the evidence I have heard, I have not seen anything that constitutes definitive evidence for prohibition. With regard to the verse in which Allah, may He be exalted, says (interpretation of the meaning):
“And they who guard their private parts
Except from their wives or those their right hands possess, for indeed, they will not be blamed –
But whoever seeks beyond that, then those are the transgressors” 
[al-Mu’minoon 23:5-7],
it was said that this verse is addressed to men, not women. In the hadith of our Prophet Muhammad (blessings and peace of Allah be upon him), “O young men, whoever among you can afford to do so, let him get married, for it is more effective in lowering the gaze and guarding chastity. Whoever is not able to do that should fast, for it will be a shield for him”, the Prophet (blessings and peace of Allah be upon him) gave us the best solution, and he did not say only to fast. If it is said that harm may be caused by doing it, then what about one who has a wet dream, because they are similar to one another, namely wet dreams and the secret habit. Moreover, there are some scholars who say that it is permissible for a wife to do that to her husband, because it is like kissing, hence from this it is clear that it is not harmful, so how can it be harmful if he does it with his own hand, but if the wife does it for her husband, it is not harmful?! If it is said that it is wasting the sperm of the man, then we say: and what about wet dreams?! Moreover, Allah, may He be exalted, says (interpretation of the meaning): “Did We not create you from a liquid disdained?” [al-Mursalaat 77:20]. And when it comes to something that is disdained, a person cannot be blamed or questioned. Moreover, we are subjected to temptation, and every day we see things that are guaranteed to provoke our desire, and we are single men. I hope that you can give us evidence which will, in sha Allah, dispel the confusion that I have.
Praise be to Allah.Firstly:
It is good for the Muslim to look for evidence concerning issues, and to study various scholarly views concerning it, so that he might learn the ruling of Allah, may He be exalted. One who researches in this manner will be rewarded; even if he reaches the wrong conclusion, he will receive one reward.
But the Muslim is sinning if he lets his whims and desires influence him when he researches matters and cause him to be biased when studying the texts –accepting them or rejecting them on that basis, and not in accordance with the principles of academic research; rather it is in accordance with his whims and desires.
Secondly:
With regard to what you have mentioned about doubts concerning the evidence for the prohibition on masturbation, it may be said:

There is no dispute that the verse you mentioned is addressed specifically to men. Ibn al-‘Arabi (may Allah have mercy on him) said:

One of the wonders of the Qur’an is that these ten verses are general in meaning and apply to both men and women, like all other phrases of the Qur’an which are applicable to all, except for the verse “And they who guard their private parts”, which is addressed specifically to men, and not women, based on the fact that it is followed by the words “Except from their wives or those their right hands possess”, as it is not permissible for women to have intimate relationships with their slaves.
End quote from Ahkaam al-Qur’an (5/464).
However, would any rational person suggest that a woman is not required to guard her private part (i.e., chastity) on the grounds that the verse is addressed only to men?! The fact that this particular verse is not addressed to women does not mean under any circumstances that the ruling mentioned is not applicable also to women. Hence Ibn al-‘Arabi (may Allah have mercy on him) said, directly after the words quoted above:
Rather the fact that women are required to guard their chastity is known from other evidence, such as the verses that speak of chastity in general and specific terms, and other evidence.
End quote from Ahkaam al-Qur’an (5/464).
One of these texts is the verse in which Allah, may He be exalted, says (interpretation of the meaning):
“And tell the believing women to lower their gaze and guard their private parts”
[an-Noor 24:31].
B. The verse clearly indicates that it is prohibited to fulfil sexual desire in any way except with a wife or concubine; anyone who fulfils his desire with men, by homosexuality, or with an animal, or by masturbation, has sought something other than the permissible means that Allah, may He be exalted, has prescribed, so he has wronged himself and has transgressed the prescribed limits. If a woman fulfils her sexual desire with anyone other than her husband, by means of lesbianism, or with an animal, or by means of masturbation, then she has wronged herself and has transgressed the prescribed limits. The evidence of the Qur’anic verse that you mentioned clearly points to these rulings that are derived from it.
Ash-Shaafa‘i (may Allah have mercy on him) said:
From the fact that the verse mentions guarding their private parts except from their wives or those whom their right hands possess, it is clear that everything other than their wives or those whom their right hands possess are forbidden.
And it clearly refers to wives and those whom their right hands possess of human females, not animals.
Then Allah emphasizes it further and says: “But whoever seeks beyond that, then those are the transgressors”. So it is not permissible to use the penis with anyone except a wife or one whom the right hand possesses (a concubine), and masturbation is not permissible. And Allah knows best.
End quote from Ahkaam al-Qur’an (1/195).
Abu Hayyaan al-Andalusi (may Allah have mercy on him) said:
The phrase “beyond that” includes zina (fornication or adultery), homosexuality, bestiality and masturbation.
What is meant by “beyond that” is beyond this limit which is set, namely wives and concubines.
End quote from Tafseer al-Bahr al-Muheet (6/391).
ii. With regard to what is mentioned in the question, that the Prophet (blessings and peace of Allah be upon him) gave us the best solution in the form of fasting, for the one who is unable to get married, but this does not mean that it is the only solution, it may be said:
Yes, what is referred to here is not the onlysolution. Several concessions have been mentioned in reports as a solution for the one who is unable to marry free women, such as taking a concubine, if he has a slave woman, and having intercourse with her; or marrying a slave woman, if he is not able to marry a free woman; or being patient and remaining chaste, if he cannot afford to get married and does not want to take a concubine or is not able to do that either.
Shaykh Muhammad ibn Saalih al-‘Uthaymeen (may Allah have mercy on him) said:
If this habit – masturbation – was permissible, the Prophet (blessings and peace of Allah be upon him) would have told us to do it, because it is less difficult than fasting, especially for young men, and because it is easier, and because a person may get some pleasure from it, so it would combine two reasons that would offer a solution, if it was permissible; those two reasons being that it is easy and pleasurable, whereas fasting involves hardship and there is no pleasure in it. So if that were permissible, the Prophet (blessings and peace of Allah be upon him) would have chosen that option and guided us to it, because it would be in accordance with the spirit of the Islamic religion, if it were permissible. Yet despite that, the hadith indicates that it is prohibited.
End quote from ash-Sharh al-Mumti‘ ‘ala Zaad al-Mustaqni‘ (14/320).
Thirdly:
There is a great difference between the nature of masturbation and the nature of wet dreams, hence they differ in the impact that they have on the body, just as they differ in the rulings concerning them in Islamic teachings.

A wet dream is something is beyond a person’s control, because he is asleep, in contrast to the one who masturbates when he is awake.
A person will not be called to account for it, in contrast to masturbation.
A wet dream is a natural dispersal of semen from the body, in contrast to masturbation in which the person brings out the semen. 
The one who has a wet dream does not use his hand or rub up against something, in contrast to the one who practices the bad habit.
Wet dreams do not have any negative effect or symptoms of disease, either physical or mental, in contrast to masturbation.

Fourthly:
The reason for the prohibition is not only the harm caused. If we assume that masturbation does not cause any harm, that would not necessarily mean that it is permissible, because of the soundness of the evidence from the Qur’an and Sunnah that it is prohibited, as noted above. However it is not far-fetched to say, because masturbation at the wife’s hand is permissible, that it is harmless or its harm is negligible, or perhaps Islam allows it because the husband does not do that a great deal, so it does not cause harm, in contrast to the forbidden kind of masturbation with which those who engage in it do not usually stop at a limit, until one of them may end up masturbating several times a day, and hence it is indeed harmful to him. See: Miftaah Daar as-Sa‘aadah (2/21).
So it is no wonder that the prohibited kind of masturbation is harmful to the body, whereas the permissible kind of masturbation at the wife’s hand is not harmful, for these two reasons:

The ruling of permissibility or prohibition determines what is good, bad or harmful.
The prohibited kind of masturbation is usually done a great deal, which leads to real harm.

Even if we assume that no harm is done, that does not necessarily mean that it is permissible, as noted above.
Fifthly:
With regard to what is mentioned in the question, that when it comes to something that is disdained, a person cannot be blamed or questioned, this is not applicable in all cases, because what is meant by the word maheen in the verse (translated here as “disdained”) is weak. Another example is seen in the verse (interpretation of the meaning): “Then He made his posterity out of the extract of a liquid disdained” [as-Sajdah 32:8].
It was explained thus by Ibn ‘Abbaas, Mujaahid, Qataadah, at-Tabari, Ibn Katheer and many others.
Al-Bukhaari (may Allah have mercy on him) said in his Saheeh (4/1793): And Mujaahid said: “maheen (disdained)” means: weak, the sperm of the man.
End quote.
At-Tabari (may Allah have mercy on him) said: The words of Allah: “Did We not create you”, O man, “from a liquid disdained?” mean: from a weak sperm drop (semen).
… It was narrated from Ibn ‘Abbaas regarding the words “Did We not create you from a liquid disdained?” that what is meant by disdained is weak.
End quote from Tafseer at-Tabari (24/132).
He also narrated that from Qataadah and Mujaahid in his Tafseer (20/173)
End quote.
Ibn Katheer said something similar in his Tafseer (5/466).
Elsewhere (8/229) he (may Allah have mercy on him) said:
“Indeed, We have created them from that which they know” [al-Ma‘aarij 70:39] means from weak semen, as He says elsewhere, “Did We not create you from a liquid disdained?” [al-Mursalaat 77:20].
End quote.
Ibn al-Qayyim (may Allah have mercy on him) said:
What is meant by maheen (disdained) here is weak; it does not refer to something that is impure and unclean.
End quote from Badaa’i‘ al-Fawaa’id (3/640).
Moreover, if we assume that what is meant by maheen (disdained) here is that it has no value , that is something that relative. This word is used to refer to the weakness of man and the perfect might and power of Allah, may He be glorified and exalted, and the wonder of His creation.
Allah, may He be exalted, says (interpretation of the meaning):
“Allah is the one who created you from weakness, then made after weakness strength, then made after strength weakness and white hair. He creates what He wills, and He is the Knowing, the Competent”
[ar-Room 30:54].
Ibn Jizzi (may Allah have mercy on him) said:
The first weakness is when man is created from a liquid disdained, and his weakness in childhood. The second weakness is old age.
End quote from at-Tasheel li ‘Uloom at-Tanzeel (1471).
Ibn ‘Aashoor (may Allah have mercy on him) said:
The purpose behind describing it as such (disdained) is to highlight the contrast between that weak sperm and man as a complete, sophisticated and splendid creature after he is created.
At-Tahreer wa’t-Tanweer (21/151).
If Allah has described the entire world as insignificant, lowly and disdained, does this mean that whoever possesses anything of it can dispose of it however he wills, and that he is not enjoined to preserve it and is not to be blamed for wasting it?
Sixthly:
Some of them said that the words “then those are the transgressors” [al-Mu’minoon 23:7] do not apply to the one who masturbates, because he is not transgressing against anyone else!
The response to that is:
The wording in the verse is ‘aadoon (transgressors), not mu‘tadoon (aggressors), what is meant is wrongdoers and those who overstep the mark.
We see something similar in the verse (interpretation of the meaning):
“Do you approach males among the worlds
And leave what your Lord has created for you as mates? But you are a people transgressing”
[ash-Shu‘araa’ 26:165-166].
Al-Baghawi (may Allah have mercy on him) said:
“then those are the transgressors” [al-Mu’minoon 23:7] means: the wrongdoers who go beyond the bounds of what is halaal to what is haraam.
End quote from Tafseer al-Baghawi (5/410).
Abu Ja‘far an-Nahhaas (may Allah have mercy on him) said:
The word ‘adaa (transgress) refers to overstepping the bounds in wrongdoing.
End quote from Ma‘aani al-Qur’an (5/99).
For more information on the ruling on masturbation (the bad habit) and how to deal with it, please see the answers to questions no. 329 and 101539.
Please see also the answer to question no. 20229 for a discussion of means that help one to lower the gaze.
In the answer to question no. 20161, there is a discussion of solutions to the problem of desire and how to fulfil it.
And Allah knows best.