Sahih Al Bukhari – Book of To Make The Heart Tender (Ar-Riqaq)
Volumn 008, Book 076, Hadith Number 521.
—————————————–
Narated By Anas bin Malik Razi Allah Anhu : Allah’s Apostle Peace Be Upon Him said, “When carried to his grave, a dead person is followed by three, two of which return (after his burial) and one remains with him: his relative, his property, and his deeds follow him; relatives and his property go back while his deeds remain with him.”
The Message in this Hadith is that we should focus a lot on something which will remain with us after the death for example charity, prayers, zikr Allah, sadqa jaria tasks etc.Although this hadith does not forbidding us to earn good in this world.