كتاب القدر
46  
The Book of Destiny
(1)
Chapter: How The Human Being Is Created, In His Mother's Womb, And His Provision, Lifespan And Deeds Are Written Down, And His Misery and Happiness
(1)
بَاب كَيْفِيَّةِ خَلْقِ الْآدَمِيِّ فِي بَطْنِ أُمِّهِ وَكِتَابَةِ رِزْقِهِ وَأَجَلِهِ وَعَمَلِهِ وَشَقَاوَتِهِ وَسَعَادَتِهِ
Sahih Muslim 2647 c

'Ali reported that one day Allah's Messenger (ﷺ) was sitting with a wood in his hand and he was scratching the ground. He raised his head and said:

There is not one amongst you who has not been allotted his seat in Paradise or Hell. They said: Allah's Messenger. then, why should we perform good deeds, why not depend upon our destiny? Thereupon he said. No, do perform good deeds, for everyone is facilitated in that for which he has been created; then he recited this verse:" Then, who gives to the needy and guards against evil and accepts the excellent (the truth of Islam and the path of righteousness it prescribes), We shall make easy for him the easy end..." (xcii. 5-10).
حَدَّثَنَا أَبُو بَكْرِ بْنُ أَبِي شَيْبَةَ، وَزُهَيْرُ بْنُ حَرْبٍ، وَأَبُو سَعِيدٍ الأَشَجُّ قَالُوا حَدَّثَنَا وَكِيعٌ، ح وَحَدَّثَنَا ابْنُ نُمَيْرٍ، حَدَّثَنَا أَبِي، حَدَّثَنَا الأَعْمَشُ، ح وَحَدَّثَنَا أَبُو كُرَيْبٍ، - وَاللَّفْظُ لَهُ - حَدَّثَنَا أَبُو مُعَاوِيَةَ، حَدَّثَنَا الأَعْمَشُ، عَنْ سَعْدِ بْنِ عُبَيْدَةَ، عَنْ أَبِي عَبْدِ الرَّحْمَنِ السُّلَمِيِّ، عَنْ عَلِيٍّ، قَالَ كَانَ رَسُولُ اللَّهِ صلى الله عليه وسلم ذَاتَ يَوْمٍ جَالِسًا وَفِي يَدِهِ عُودٌ يَنْكُتُ بِهِ فَرَفَعَ رَأْسَهُ فَقَالَ ‏"‏ مَا مِنْكُمْ مِنْ نَفْسٍ إِلاَّ وَقَدْ عُلِمَ مَنْزِلُهَا مِنَ الْجَنَّةِ وَالنَّارِ ‏"‏ ‏.‏ قَالُوا يَا رَسُولَ اللَّهِ فَلِمَ نَعْمَلُ أَفَلاَ نَتَّكِلُ قَالَ ‏"‏ لاَ ‏.‏ اعْمَلُوا فَكُلٌّ مُيَسَّرٌ لِمَا خُلِقَ لَهُ ‏"‏ ‏.‏ ثُمَّ قَرَأَ ‏{‏ فَأَمَّا مَنْ أَعْطَى وَاتَّقَى * وَصَدَّقَ بِالْحُسْنَى‏}‏ إِلَى قَوْلِهِ ‏{‏ فَسَنُيَسِّرُهُ لِلْعُسْرَى‏}
Reference : Sahih Muslim 2647c
In-book reference : Book 46, Hadith 11
USC-MSA web (English) reference : Book 33, Hadith 6400
  (deprecated numbering scheme)