Caution: Translations of Quran and Ḥadīth may lead to possible misapplications and misinterpretations. This site is intended for students of sacred knowledge that are proficient in comprehending classical Arabic and have a strong foundation in Islamic sciences. Also note that religious injunctions rely on several aspects beyond what one may glean through reading individual aḥādīth.
quran:6:44

So when they forgot that by which they had been reminded, We opened to them the doors of every ˹good˺ thing until, when they rejoiced in that which they were given, We seized them suddenly, and they were ˹then˺ in despair.  

So, when they forgot, ˹when˺ they neglected, that whereof they were reminded, that with which they were admonished and threatened, in the way of misery and hardship; and they did not heed the admonition, We opened (read fatahnā or fattahnā) to them the gates of all things, in the way of graces, in order to draw them on by degrees, until, when they rejoiced in what they were given, a wanton rejoicing, We seized them suddenly, with chastisement, and lo! they were confounded, despairing of anything good.
القرآن:٦:٤٤

فَلَمَّا نَسُوا مَا ذُكِّرُوا بِهِ فَتَحْنَا عَلَيْهِمْ أَبْوَابَ كُلِّ شَيْءٍ حَتَّىٰ إِذَا فَرِحُوا بِمَا أُوتُوا أَخَذْنَاهُمْ بَغْتَةً فَإِذَا هُمْ مُبْلِسُونَ  

{فلما نسوا} تركوا {ما ذكروا} وُعظوا وخوفوا {به} من البأساء والضراء فلم يتعظوا {فتحنا} بالتخفيف والتشديد {عليهم أبواب كلِّ شيء} من النعم استدراجا لهم {حتى إذا فرحوا بما أوتوا} فرح بطر {أخذناهم} بالعذاب {بغتة} فجأة {فإذا هم مبلسون} آيسون من كل خير.

See similar narrations below:

Collected by Aḥmad, Aḥmad's Zuhd
ahmad:17311Yaḥyá b. Ghaylān > Rishdīn / Ibn Saʿd Abū al-Ḥajjāj al-Mahrī > Ḥarmalah b. ʿImrān al-Tujībī > ʿUqbah b. Muslim > ʿUqbah b. ʿĀmir

[Machine] On the authority of the Prophet ﷺ , he said, "When you see Allah giving the servant from the worldly life what he loves despite his sins, then it is only a means to lure him in. Then the Messenger of Allah ﷺ recited, 'So when they forgot that by which they had been reminded, We opened to them the doors of every [good] thing until, when they rejoiced in that which they were given, We seized them suddenly, and they were [then] in despair.' [Quran 6:44]."  

أحمد:١٧٣١١حَدَّثَنَا يَحْيَى بْنُ غَيْلَانَ قَالَ حَدَّثَنَا رِشْدِينُ يَعْنِي ابْنَ سَعْدٍ أَبُو الْحَجَّاجِ الْمَهْرِيُّ عَنْ حَرْمَلَةَ بْنِ عِمْرَانَ التُّجِيبِيِّ عَنْ عُقْبَةَ بْنِ مُسْلِمٍ عَنْ عُقْبَةَ بْنِ عَامِرٍ

عَنِ النَّبِيِّ ﷺ قَالَ إِذَا رَأَيْتَ اللهَ يُعْطِي الْعَبْدَ مِنَ الدُّنْيَا عَلَى مَعَاصِيهِ مَا يُحِبُّ فَإِنَّمَا هُوَ اسْتِدْرَاجٌ ثُمَّ تَلَا رَسُولُ اللهِ ﷺ {فَلَمَّا نَسُوا مَا ذُكِّرُوا بِهِ فَتَحْنَا عَلَيْهِمْ أَبْوَابَ كُلِّ شَيْءٍ حَتَّى إِذَا فَرِحُوا بِمَا أُوتُوا أَخَذْنَاهُمْ بَغْتَةً فَإِذَا هُمْ مُبْلِسُونَ} [الأنعام 44]  

ahmad-zuhd:63ʿAbdullāh from my father > Yaḥyá b. Ghaylān > Rishdīn b. Saʿd > Ḥarmalah b. 14 ʿImrān al-Tujaybī > ʿUqbah b. Muslim > ʿUqbah b. ʿĀmir

[Machine] On the authority of the Prophet ﷺ , he said: "When you see Allah giving a servant of His from the world despite his sins, it is a gradual capture. Then recite the saying of Allah: 'So when they forgot that by which they were reminded, We opened to them the doors of every [good] thing until, when they rejoiced in that which they were given, We seized them suddenly, and they were [then] in despair.' [Surah Al-Anam 6:44]."  

الزهد لأحمد:٦٣حَدَّثَنَا عَبْدُ اللَّهِ حَدَّثَنَا أَبِي حَدَّثَنَا يَحْيَى بْنُ غَيْلَانَ حَدَّثَنَا رِشْدِينُ بْنُ سَعْدٍ عَنْ حَرْمَلَةَ بْنِ [14] عِمْرَانَ التُّجَيْبِيِّ عَنْ عُقْبَةَ بْنِ مُسْلِمٍ عَنْ عُقْبَةَ بْنِ عَامِرٍ

عَنِ النَّبِيِّ ﷺ قَالَ إِذَا رَأَيْتَ اللَّهَ ﷻ يُعْطِي الْعَبْدَ مِنَ الدُّنْيَا عَلَى مَعَاصِيهِ مَا يُحِبُّ فَإِنَّهُ اسْتِدْرَاجٌ ثُمَّ تَلَا قَوْلَ اللَّهِ ﷻ {فَلَمَّا نَسُوا مَا ذُكِّرُوا بِهِ فَتَحْنَا عَلَيْهِمْ أَبْوَابَ كُلِّ شَيْءٍ حَتَّى إِذَا فَرِحُوا بِمَا أُوتُوا أَخَذْنَاهُمْ بَغْتَةً فَإِذَا هُمْ مُبْلِسُونَ} [الأنعام 44]