Learn the Islamic ruling on masturbation with evidence from the Qur’an, Sunnah, and scholars. Discover why it is haram and practical ways to stop this habit according to authentic Islamic guidance.
All perfect praise be to Allah, Lord of the Worlds. I testify that there is none worthy of worship except Allah, and that Prophet Muhammad ﷺ is His slave and Messenger.
One of the most important matters related to chastity and purity is understanding what Islam permits and forbids in matters of sexual desire. Islam does not suppress natural desire, but it regulates it within lawful boundaries to protect the individual and society from corruption.
Is masturbation haram in Islam?
The correct and established view of the majority of scholars is that masturbation (for both men and women) is haram (forbidden), except in cases of extreme necessity where fear of falling into zina is real and unavoidable, and even then scholars differ on strict conditions.
The prohibition is based on clear general principles from the Qur’an and Sunnah that command believers to preserve chastity and avoid all sexual gratification outside marriage.
Evidence from the Qur’an
Allah commands the believers to guard their private parts and restrict sexual pleasure only to lawful means.
“And those who guard their private parts. Except from their wives or those whom their right hands possess, for indeed, they are not to be blamed. But whoever seeks beyond that, then those are the transgressors.”
Qur’an, Surah Al-Mu’minun 23:5–7
The scholars of Tafsir explained that this verse restricts sexual gratification to marriage and lawful relations, and anything beyond that falls under transgression.
Imam Ash-Shafi’i (رَحِمَهُ ٱللّٰهُ) and other scholars used this verse as evidence that masturbation is not included among the lawful means of sexual satisfaction.
Allah also says:
“And let those who do not find the means to marry keep themselves chaste until Allah enriches them from His bounty.”
Qur’an, Surah An-Nur 24:33
This verse commands patience and chastity for those unable to marry, and the scholars explain that masturbation is not a permitted alternative; rather, fasting and restraint are prescribed.
Evidence from the Sunnah
The Messenger of Allah ﷺ gave a clear instruction to young people struggling with desire:
“O young people, whoever among you can marry, let him marry, for it is more effective in lowering the gaze and guarding chastity. And whoever is not able, then he should fast, for it will be a shield for him.”
Sahih al-Bukhari, 5066; Sahih Muslim, 1400
The Prophet Muhammad ﷺ directed those who cannot marry to fast, not to seek sexual release through unlawful means. The scholars mention that if masturbation were permissible, it would have been mentioned as an option in such a context.
Statements of the scholars
Ibn Kathir (رَحِمَهُ ٱللّٰهُ) mentioned that seeking sexual pleasure outside marriage falls under the prohibition implied in the verses of Surah Al-Mu’minun.
Imam Malik (رَحِمَهُ ٱللّٰهُ) was asked about self-gratification and considered it blameworthy and outside the boundaries of permissible relief.
Ibn Taymiyyah (رَحِمَهُ ٱللّٰهُ) explained that masturbation is not permissible in general, and that the one who fears hardship must seek lawful means such as fasting and strengthening self-control.
Why masturbation is prohibited
Islam forbids masturbation because it contradicts the objective of chastity, weakens self-control, and replaces lawful intimacy with private gratification that has no binding responsibility or purpose.
It also often leads to further sins such as pornography, neglect of prayer, and addiction to sexual fantasies, which damage both spiritual and psychological wellbeing.
How to stop masturbation: practical Islamic steps
Islam does not only prohibit sin but also provides guidance to overcome it. The following steps are derived from the Qur’an, Sunnah, and advice of scholars:
- 1. Strengthen sincerity — Remember that leaving sin is an act of worship for Allah alone.
- 2. Marriage if possible — The primary solution for lawful satisfaction.
- 3. Fasting — As instructed by the Prophet Muhammad ﷺ to control desire.
- 4. Lowering the gaze — Avoiding images, videos, and environments that trigger desire.
- 5. Avoiding isolation — Staying in productive company and avoiding long solitude.
- 6. Keeping busy with beneficial deeds — Study, work, worship, and community engagement.
- 7. Sleeping early with adhkar — Following prophetic guidance for bedtime protection.
- 8. Avoiding pornography completely — It is a major gateway to this habit.
- 9. Making sincere du’a — Asking Allah for purity and self-control.
- 10. Immediate repentance if slip occurs — Not continuing in guilt or despair.
A principle of hope and patience
The Prophet Muhammad ﷺ said:
“Whoever seeks chastity, Allah will help him remain chaste. Whoever seeks patience, Allah will grant him patience.”
Sahih al-Bukhari, 1469
This shows that overcoming desire is possible through sincerity, patience, and reliance upon Allah.
Conclusion
Masturbation is not permitted in Islam according to the Qur’an, the Sunnah, and the understanding of the scholars. The believer is commanded to guard his chastity and only seek sexual fulfillment through lawful marriage. Whoever struggles with desire should turn to fasting, lowering the gaze, and strengthening his connection with Allah.
And Allah knows best.
Read the answer in: English | Arabic | Bangla | Urdu | Hindi | Indonesian | Turkish | French | Spanish | Swahili