Sahih Bukhari – Hadith No : 7647

Narrated `Ali: While the Prophet was in a funeral procession, he took a stick and started scraping the earth with it and said, “There is none of you but has his place assigned either in Hell or in Paradise.” They (the people) said, “Shall we not depend upon that (and give up doing any deeds)?’ He said, ” Carry on doing (good deeds) for everybody will find it easy to do such deeds as will lead him to his destined place for which he has been created .” (And then the Prophet recited the Verse):– ‘As for him who gives (in charity) and keeps his duty to Allah…’ (92.5)

Hadith In Arabic Text :

حدثني محمد بن بشار، حدثنا غندر، حدثنا شعبة، عن منصور، والأعمش، سمعا سعد بن عبيدة، عن أبي عبد الرحمن، عن علي رضى الله عنه عن النبي صلى الله عليه وسلم أنه كان في جنازة فأخذ عودا فجعل ينكت في الأرض فقال ‏”‏ ما منكم من أحد إلا كتب مقعده من النار أو من الجنة ‏”‏‏.‏ قالوا ألا نتكل‏.‏ قال ‏”‏ اعملوا فكل ميسر ‏{‏فأما من أعطى واتقى‏}‏ ‏”‏‏.‏ الآية‏.‏

Chapter : Oneness; Uniqueness of Allah (Tawheed) – كتاب التوحيد