Short answer
No. Thoughts that come to you, however dark, are not a sin, and Allah does not hold you to account for what passes through your mind without acting on it. Suicidal thoughts are usually a sign of illness and pain, not weak faith. If you are having them now, please contact emergency services or a crisis line in your country, or tell someone you trust today.
Unchosen thoughts (khawatir) carry no sin, and thoughts that arise from illness are an excuse before Allah. Acting on them is a major sin, which is why seeking help, treatment and safety is not only allowed but required of a person at risk.
The four schools agree on this.
Explanation
If you are thinking of ending your life right now, please stop reading and get help. Call your local emergency number, go to the nearest emergency department, or contact a suicide or crisis line in your country. Tell one person you trust what you are feeling. You deserve support, and this pain can ease.
The Prophet ﷺ said that Allah overlooks for his ummah what their souls whisper to them, as long as they do not act on it or speak it. Some Companions once told him they found thoughts in themselves too terrible to say out loud, and he said that this is clear faith, because hating such thoughts shows a living heart. Having suicidal thoughts does not make you a bad Muslim, or someone Allah has abandoned.
The Prophet ﷺ also told us not to wish for death because of a hardship, and that if someone must, they should say: O Allah, keep me alive as long as life is better for me, and take me when death is better for me. This turns the wish into a dua and hands the matter back to Allah. Allah says do not kill yourselves. Indeed, Allah is to you ever Merciful (4:29), and do not despair of the mercy of Allah (39:53).
Practical steps:
- Speak to a doctor or mental health professional. Depression and the other conditions behind these thoughts are treatable, and treatment is part of the Sunnah (see seeing a therapist).
- Make a safety plan: remove means of harm, and know whom you will call.
- Keep whatever prayers you can manage, even short ones, and say the dua above.
- If someone confides in you, listen without lecturing and help them get help.
Ask a mufti about your own case. This answer explains the general ruling. When the details of your situation matter, as they do here, ask a qualified mufti and give them the full facts. Where to ask a scholar.
The evidence
Quran, Surah An-Nisaa 4:29
يَٰٓأَيُّهَا ٱلَّذِينَ ءَامَنُوا۟ لَا تَأْكُلُوٓا۟ أَمْوَٰلَكُم بَيْنَكُم بِٱلْبَٰطِلِ إِلَّآ أَن تَكُونَ تِجَٰرَةً عَن تَرَاضٍۢ مِّنكُمْ ۚ وَلَا تَقْتُلُوٓا۟ أَنفُسَكُمْ ۚ إِنَّ ٱللَّهَ كَانَ بِكُمْ رَحِيمًۭا ﴿٢٩﴾
O you who have believed, do not consume one another's wealth unjustly but only [in lawful] business by mutual consent. And do not kill yourselves [or one another]. Indeed, Allah is to you ever Merciful.
Life is protected, and the verse ends with Allah's mercy.
Quran, Surah Az-Zumar 39:53
۞ قُلْ يَٰعِبَادِىَ ٱلَّذِينَ أَسْرَفُوا۟ عَلَىٰٓ أَنفُسِهِمْ لَا تَقْنَطُوا۟ مِن رَّحْمَةِ ٱللَّهِ ۚ إِنَّ ٱللَّهَ يَغْفِرُ ٱلذُّنُوبَ جَمِيعًا ۚ إِنَّهُۥ هُوَ ٱلْغَفُورُ ٱلرَّحِيمُ ﴿٥٣﴾
Say, "O My servants who have transgressed against themselves [by sinning], do not despair of the mercy of Allah. Indeed, Allah forgives all sins. Indeed, it is He who is the Forgiving, the Merciful."
No state puts a person beyond Allah's mercy.
Sahih al-Bukhari 5269
Sahih... إن الله تجاوز عن أمتي ما حدثت به أنفسها ما لم تعمل أو تتكلم ...
"Allah has overlooked for my ummah what their souls whisper, as long as they do not act on it or speak it."
Thoughts that are not acted on are not sins.
Sahih Muslim 132
Sahih... وقد وجدتموه قالوا نعم قال ذاك صريح الإيمان ...
"Have you really felt that? They said yes. He said: That is clear faith."
Hating dark thoughts that come unbidden is a sign of faith.
Sahih al-Bukhari 5671
Sahih... لا يتمنين أحدكم الموت من ضر أصابه ...
"None of you should wish for death because of a harm that has befallen him."
He gave a dua to say instead, handing the matter to Allah.
Where the ruling is recorded
- Umdat al-Qari (al-Ayni), Kitab al-Talaq, on the hadith that Allah overlooks what the soul whispers. Explains the stages of thought and that passing thoughts carry no sin.
Checked by our team. For a more accurate answer to your own situation, consult a scholar. Quran translation by Sahih International. Hadith Arabic from the standard editions of the six books and the Muwatta, with gradings as recorded there; the English is our own rendering. Spotted a mistake? Tell us.