All Muslim scholars agree — based on what has been revealed in the Qur’an and what has been authenticated in the Prophetic Sunnah — that homosexual behavior (gayness and lesbianism) is prohibited because it is an assault on the humanity of a person, destruction of the family, and a clash with the aims of the Lawgiver, one of which is the establishment of sexual instincts between males and females so as to encourage the institution of marriage.
However, for any Muslim who fell in this sin should not lose hope in gaining Allah’s forgiveness. He should rush seriously and sincerely to repent to Allah seeking His forgiveness and pardon. Sincere repentance involves regretting the sin, stopping all haram relations, and resolving not to do such a sin again. Also, he should try to do as much as he can of good deeds as they wipe out the wrongdoings.
Allah says in the Qur’an: “Say: ‘O my Servants who have transgressed against their souls! Despair not of the Mercy of Allah: for Allah forgives all sins: for He is Oft-Forgiving, Most Merciful.'” (Az-Zumar: 53) “Allah accepts the repentance of those who do evil in ignorance and repent soon afterwards; to them will Allah turn in mercy: For Allah is full of knowledge and wisdom.” (An-Nisa’: 17)
In this regard, Sheikh Ahmad Kutty, a senior lecturer and Islamic scholar at the Islamic Institute of Toronto, Ontario, Canada, states:
The one who commits homosexuality is not at all different from the one who has been conditioned to fornicate, or commit theft or murder, or who has become addicted to watching pornography or even television for that matter. All of these are destructive habits that one learns through continuous exposure or conditioning. So he must ask yourself whether you would prefer to continue in this destructive behavior or change yourself?
If he is a Muslim, he is left with no choice but to change. For homosexuality is considered one of the most abominable sins in Islam; it is so enormous in intensity and gravity that Allah tells us in the Qur’an that because of it, an entire nation was destroyed by Allah in a most horrible way. We must know that the stories narrated in the Qur’an are not meant for chanting or entertainment; rather they are meant to teach us valuable lessons for our benefit. Allah says: (Truly in their stories is a lesson for people of understanding, for this (Book) is not a forged tale, but is a confirmation of the revelations of that preceded it, a detailed explanation of all things, a guidance and a mercy to people who believe.) (Yusuf 12: 111)
So you should ask yourself whether you wish to belong to the category of those who have been condemned to eternal perdition by Allah. The choice is yours and yours alone; you cannot say, “I don’t have any choice.” The sin of the one who abused you while you were a child is his alone; he will surely meet his Creator for his sin. But his sin does not justify yours, for you are a free person with your own choice and will. If you really believe in Allah, and convince yourself sufficiently of the need to change, and motivates yourself by reading and reflecting and thinking of standing before the Lord of the worlds, you will be free to break any such destructive habits. Islam is full of examples of those who were addicted to all sorts of crimes and sins, but eventually they changed their lives around by affirming faith and commitment in Allah and working diligently upon themselves.
So I advise the sinner to summon and mobilize all your spiritual, emotional, intellectual, and practical resources to break free of this most destructive and abominable habit and learn new positive habits that are pleasing to Allah.
Here are a few tips to help you:
1. Be convinced that the pleasure that you derive from such an abominable behavior is in reality nothing but pain and suffering in the long term. So instead of associating this behavior with pleasure, learn to associate and link it with pain; so every time you are tempted to do it, just picture the pain and suffering of hell fire. By repeatedly going through this exercise, you will eventually come to abhor and shun this behavior altogether.
2. Continuously read, reflect and meditate on the verses of the Qur’an that deal with the punishment meted to the nation who practiced this abomination; also read the verses depicting hell fire. (For instance: Qur’an: 7: 80-84; 11: 77-83; 40: 47-50, etc.)
3. Ask yourself whether he wishes to belong to the group of the wicked sinners condemned by Allah or join the company of the prophets, saintly ones, the martyrs and the righteous who are blessed by Allah. The choice is his and his alone.
4. Immediately cut off all relations with people who lead such a life-style.
5. Meditate on the ephemeral and transient nature of this world. The pleasures of this world are fleeting while the pleasure and pain of Hereafter are ever lasting.
6. Make dhikr and du`a’ your constant companion. By seeking Allah’s help to fight this behavior, you can surely overcome and break free of this abomination. Allah has promised to come to the help of those who strive in His way: (As for those who strive for Our sake, We will guide them unto Our ways; verily, Allah is with those who behave with excellence.) (Al-`Ankabut 29: 69)
Make sure that the gate of repentance is widely open for those who sincerely seek God’s forgiveness as Allah the Almighty says: : “Say: ‘O my Servants who have transgressed against their souls! Despair not of the Mercy of Allah: for Allah forgives all sins: for He is Oft-Forgiving, Most Merciful.'” (Az-Zumar: 53)