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.
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:
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:
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:
A principle of hope and patience
The Prophet Muhammad ﷺ said:
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