The Messenger of Allah ﷺ said, "A man may perform the deeds of righteous people for seventy years, but when he makes his will, he acts unjustly in it, so his deeds are sealed with the worst of his actions and he enters the Fire. And a man may perform the deeds of wicked people for seventy years, but he is just in his will, so his deeds are sealed with the best of his actions and he enters Paradise."Abu Hurairah said, "Recite if you wish, 'These are the limits set by Allah' up to His statement 'and for him is a humiliating punishment'" [Nisa 4:13–14].
قال رسول الله ﷺ: إن الرجل ليعمل بعمل أهل الخير سبعين سنة، فإذا أوصى حاف في وصيته، فيختم له بشر عمله، فيدخل النار. وإن الرجل ليعمل بعمل أهل الشر سبعين سنة، فيعدل في وصيته، فيختم له بخير عمله، فيدخل الجنة. قال أبو هريرة: اقرؤوا إن شئتم {تلك حدود الله} إلى قوله وله عذاب مهين [سورة النساء: ١٣-١٤].
Abu Dawud (2867), Ibn Majah (2703), Tirmidhi (2117), and Ahmad (7743) - the wording is Ahmad's - all narrated it, all of them through the hadith of Ashath bin Abdullah, from Shahr bin Hawshab, from Abu Hurairah, and he mentioned it. Tirmidhi said, "Hasan gharib." I say, it is as he said, for Shahr bin Hawshab, in my view, is of hasan hadith, and Ahmad, Ibn Main, and others have declared him trustworthy.As for what was narrated from Ibn Abbas as a marfu narration, "Causing harm through a bequest is among the major sins," the correct view is that it is mawquf. It was narrated by Daraqutni (4/151) and Aqeeli (3/189) through the route of Umar bin Mughira, who said, Dawud bin Abu Hind narrated to us, from Ikrima, from Ibn Abbas, and he mentioned it as marfu. Aqeeli said, "We do not know anyone who narrated it as marfu except Umar bin Mughira Masissi."It was narrated by Saeed bin Mansur (342-344), and through his route by Bayhaqi (6/271), as mawquf, attributed to Ibn Abbas, and he said, "This is the correct version, mawquf, and it was narrated through another route as marfu, but its raising to marfu status is daif."