كتاب الإيمان
1  
The Book of Faith
(57)
Chapter: Clarification that Allah, most high allows a person's thoughts and whatever occurs in his heart, so long as they do not become established, and the clarification that he, glorious is he and most high, does not burden anyone with more than he can bear, and clarifying the ruling on thinking of doing good and bad deeds
(57)
باب بَيَانِ أَنَّهُ سُبْحَانَهُ وَتَعَالَى لَمْ يُكَلِّفْ إِلَّا مَا يُطَاقُ
Sahih Muslim 125

It is reported on the authority of Abu Huraira that when it was revealed to the Messenger of Allah (ﷺ):

To Allah belongs whatever is in the heavens and whatever is in the earth and whether you disclose that which is in your mind or conceal it, Allah will call you to account according to it. Then He forgives whom He pleases and chastises whom He Pleases; and Allah is over everything Potent" (ii. 284). the Companions of the Messenger of Allah (ﷺ) felt it hard and severe and they came to the Messenger of Allah (ﷺ) and sat down on their knees and said: Messenger of Allah, we were assigned some duties which were within our power to perform, such as prayer, fasting, struggling (in the cause of Allah), charity. Then this (the above-mentioned) verse was revealed unto you and it is beyond our power to live up to it. The Messenger of Allah (ﷺ) said: Do you intend to say what the people of two books (Jews and Christians) said before you:" We hear and disobey"? You should rather say:" We hear and we obey, (we seek) Thy forgiveness, our Lord! and unto Thee is the return." And they said:" We hear and we obey, (we seek) Thy forgiveness, Our Lord! and unto Thee is the return." When the people recited it and it smoothly flowed on their tongues, then Allah revealed immediately afterwards:" The Apostle believes in that which is sent down unto him from his Lord, and so do the believers. Each one believes in Allah and His Angels and His Books and His Apostles, saying: We differentiate not between any of His Apostles and they say: We hearken and we obey: (we seek) Thy forgiveness, our Lord! and unto Thee is the return" (ii. 285). When they did that, Allah abrogated this (verse) and the Great, Majestic Allah revealed:" Allah burdens not a soul beyond its capacity. It gets every good that it earns and it suffers every ill that it earns. Our Lord, punish us not if we forget or make a mistake." (The Prophet said: ) Yes, our Lord! do not lay on us a burden as Thou didst lay on those before us. (The Prophet said: ) Yes, our Lord, impose not on us (burdens) which we have not the strength to bear (The Prophet said: ) Yes, and pardon us and grant us protection! and have mercy on us. Thou art our Patron, so grant us victory over the disbelieving people" (ii. 286). He (the Lord) said: Yes.
حَدَّثَنِي مُحَمَّدُ بْنُ مِنْهَالٍ الضَّرِيرُ، وَأُمَيَّةُ بْنُ بِسْطَامَ الْعَيْشِيُّ، - وَاللَّفْظُ لأُمَيَّةَ - قَالاَ حَدَّثَنَا يَزِيدُ بْنُ زُرَيْعٍ، حَدَّثَنَا رَوْحٌ، - وَهُوَ ابْنُ الْقَاسِمِ - عَنِ الْعَلاَءِ، عَنْ أَبِيهِ، عَنْ أَبِي هُرَيْرَةَ، قَالَ لَمَّا نَزَلَتْ عَلَى رَسُولِ اللَّهِ صلى الله عليه وسلم ‏{‏ لِلَّهِ مَا فِي السَّمَوَاتِ وَمَا فِي الأَرْضِ وَإِنْ تُبْدُوا مَا فِي أَنْفُسِكُمْ أَوْ تُخْفُوهُ يُحَاسِبْكُمْ بِهِ اللَّهُ فَيَغْفِرُ لِمَنْ يَشَاءُ وَيُعَذِّبُ مَنْ يَشَاءُ وَاللَّهُ عَلَى كُلِّ شَىْءٍ قَدِيرٌ‏}‏ قَالَ فَاشْتَدَّ ذَلِكَ عَلَى أَصْحَابِ رَسُولِ اللَّهِ صلى الله عليه وسلم فَأَتَوْا رَسُولَ اللَّهِ صلى الله عليه وسلم ثُمَّ بَرَكُوا عَلَى الرُّكَبِ فَقَالُوا أَىْ رَسُولَ اللَّهِ كُلِّفْنَا مِنَ الأَعْمَالِ مَا نُطِيقُ الصَّلاَةُ وَالصِّيَامُ وَالْجِهَادُ وَالصَّدَقَةُ وَقَدْ أُنْزِلَتْ عَلَيْكَ هَذِهِ الآيَةُ وَلاَ نُطِيقُهَا ‏.‏ قَالَ رَسُولُ اللَّهِ صلى الله عليه وسلم ‏"‏ أَتُرِيدُونَ أَنْ تَقُولُوا كَمَا قَالَ أَهْلُ الْكِتَابَيْنِ مِنْ قَبْلِكُمْ سَمِعْنَا وَعَصَيْنَا بَلْ قُولُوا سَمِعْنَا وَأَطَعْنَا غُفْرَانَكَ رَبَّنَا وَإِلَيْكَ الْمَصِيرُ ‏"‏ ‏.‏ قَالُوا سَمِعْنَا وَأَطَعْنَا غُفْرَانَكَ رَبَّنَا وَإِلَيْكَ الْمَصِيرُ ‏.‏ فَلَمَّا اقْتَرَأَهَا الْقَوْمُ ذَلَّتْ بِهَا أَلْسِنَتُهُمْ فَأَنْزَلَ اللَّهُ فِي إِثْرِهَا ‏{‏ آمَنَ الرَّسُولُ بِمَا أُنْزِلَ إِلَيْهِ مِنْ رَبِّهِ وَالْمُؤْمِنُونَ كُلٌّ آمَنَ بِاللَّهِ وَمَلاَئِكَتِهِ وَكُتُبِهِ وَرُسُلِهِ لاَ نُفَرِّقُ بَيْنَ أَحَدٍ مِنْ رُسُلِهِ وَقَالُوا سَمِعْنَا وَأَطَعْنَا غُفْرَانَكَ رَبَّنَا وَإِلَيْكَ الْمَصِيرُ‏}‏ فَلَمَّا فَعَلُوا ذَلِكَ نَسَخَهَا اللَّهُ تَعَالَى فَأَنْزَلَ اللَّهُ عَزَّ وَجَلَّ ‏{‏ لاَ يُكَلِّفُ اللَّهُ نَفْسًا إِلاَّ وُسْعَهَا لَهَا مَا كَسَبَتْ وَعَلَيْهَا مَا اكْتَسَبَتْ رَبَّنَا لاَ تُؤَاخِذْنَا إِنْ نَسِينَا أَوْ أَخْطَأْنَا‏}‏ قَالَ نَعَمْ ‏{‏ رَبَّنَا وَلاَ تَحْمِلْ عَلَيْنَا إِصْرًا كَمَا حَمَلْتَهُ عَلَى الَّذِينَ مِنْ قَبْلِنَا‏}‏ قَالَ نَعَمْ ‏{‏ رَبَّنَا وَلاَ تُحَمِّلْنَا مَا لاَ طَاقَةَ لَنَا بِهِ‏}‏ قَالَ نَعَمْ ‏{‏ وَاعْفُ عَنَّا وَاغْفِرْ لَنَا وَارْحَمْنَا أَنْتَ مَوْلاَنَا فَانْصُرْنَا عَلَى الْقَوْمِ الْكَافِرِينَ‏}‏ قَالَ نَعَمْ ‏.‏
Reference : Sahih Muslim 125
In-book reference : Book 1, Hadith 236
USC-MSA web (English) reference : Book 1, Hadith 228
  (deprecated numbering scheme)