We were at a funeral in Baqee al-Gharqad when the Prophet ﷺ came to us and sat down, and we sat around him. He had a small stick with him, and he lowered his head and began scratching the ground with it. Then he said, "There is not one of you, not a single soul that has been born, whose place in Paradise or Hell has not already been written, and whose wretchedness or happiness has not already been decreed."A man asked, "Messenger of Allah, should we then not rely on what has been written for us and abandon deeds? For whoever among us is of the people of happiness will arrive at the deeds of the people of happiness, and whoever among us is of the people of wretchedness will arrive at the deeds of the people of wretchedness."He replied, "As for the people of happiness, they will be made to find ease in the deeds of happiness, and as for the people of wretchedness, they will be made to find ease in the deeds of wretchedness."Then he recited, "As for the one who gives and is mindful of Allah" [Layl 92:5], the verse.
كنا في جنازة في بقيع الغرقد، فأتانا النبي ﷺ فقعد، وقعدنا حوله ومعه مخصرة فنكس فجعل ينكت بمخصرته، ثم قال: ما منكم من أحد ما من نفس منفوسة إلا كتب مكانها من الجنة والنار، وإلا قد كتبت شقية أو سعيدة. فقال رجل: يا رسول الله أفلا نتكل على كتابنا وندع العمل، فمن كان منا من أهل السعادة فسيصير إلى عمل أهل السعادة، وأما من كان منا من أهل الشقاوة فسيصير إلى عمل أهل الشقاوة؟ قال: أما أهل السعادة فييسرون لعمل السعادة، وأما أهل الشقاوة فييسرون لعمل الشقاوة. ثم قرأ: {فأما من أعطى واتقى} الآية [سورة الليل: ٥].
Bukhari narrated it in the Book of Funerals (1362), and Muslim in the Book of Divine Decree (2647), both from the hadith of Jareer, from Mansur, from Saad bin Ubayda, from Abu Abdul-Rahman, from Ali, who related it. The wording given is Bukhari's, and Muslim's wording is similar.In another version found in both of them, "Act, for everyone is made easy toward what he was created for."His saying "mikhsara" means a light stick. And his saying "a soul that is born" means one that has been given birth.