Hadithcore
Riyad as-Salihin, 585

Anas bin Malik (May Allah be pleased with him) reported:

Messenger of Allah (ﷺ) said, "Let none of you wish for death on account of an affliction that befalls him. If he has no alternative, let him pray: 'Allahumma ahyine ma kanatil-hayatu khairan li, wa tawaffani idha kanatil-wafatu khairan li (O Allah! Give my life so long as the life is good for me, and take away my life if death is good for me)'." <b>[Al-Bukhari and Muslim]</b>.

وعن أنس رضي الله عنه قال‏:‏ قال رسول الله صلى الله عليه وسلم‏:‏ “لا يتمنين أحدكم الموت لضر أصابه فإن كان لابد فاعلاً، فليقل‏:‏ اللهم أحينى ما كانت الحياة خيراً لى، وتوفنى إذا كانت الوفاة خيراً لى” ‏(‏‏(‏متفق عليه‏)‏‏)‏‏.‏

References1 variant
In-Book Reference
Introduction, Hadith 584
Sharh · explanationclick to expand
<b>Guidance from the Hadiths:</b><br> 1) Wishing for death is in some way a sign of discontentment with Allah’s decrees.<br> 2) The life of a believer is better for him, for in it he either increases his good deeds or repents from his sins.
Related hadiths11
Compare isnād across 11 related chains →