Abu Huraira reported: The Messenger of Allah, peace and blessings be upon him, said, “Verily, a man might act like the people of virtue for seventy years, but he enjoins injustice in his will, sealing his life with evil and entering the Hellfire. Verily, a man might act like the people of vice for seventy years, but he enjoins justice in his will, sealing his life with virtue and entering Paradise.”
Abu Huraira said, “Recite the verse if you wish, ‘Such are the limits of Allah. Whoever obeys Allah and His Messenger will enter gardens beneath which rivers flow, abiding therein forever. That is the greatest victory!’” (4:13)
Source: Musnad Aḥmad 7728
Grade: Sahih (authentic) according to Ahmad Shakir
عَنْ أَبِي هُرَيْرَةَ قَالَ قَالَ رَسُولُ اللَّهِ صَلَّى اللهُ عَلَيْهِ وَسَلَّمَ إِنَّ الرَّجُلَ لَيَعْمَلُ بِعَمَلِ أَهْلِ الْخَيْرِ سَبْعِينَ سَنَةً فَإِذَا أَوْصَى حَافَ فِي وَصِيَّتِهِ فَيُخْتَمُ لَهُ بِشَرِّ عَمَلِهِ فَيَدْخُلُ النَّارَ وَإِنَّ الرَّجُلَ لَيَعْمَلُ بِعَمَلِ أَهْلِ الشَّرِّ سَبْعِينَ سَنَةً فَيَعْدِلُ فِي وَصِيَّتِهِ فَيُخْتَمُ لَهُ بِخَيْرِ عَمَلِهِ فَيَدْخُلُ الْجَنَّةَ
قَالَ أَبُو هُرَيْرَةَ وَاقْرَءُوا إِنْ شِئْتُمْ تِلْكَ حُدُودُ اللَّهِ وَمَن يُطِعِ اللَّهَ وَرَسُولَهُ يُدْخِلْهُ جَنَّاتٍ تَجْرِي مِن تَحْتِهَا الْأَنْهَارُ خَالِدِينَ فِيهَا وَذَٰلِكَ الْفَوْزُ الْعَظِيمُ
7728 مسند أحمد بن حنبل
7/448 المحدث أحمد شاكر خلاصة حكم المحدث إسناده صحيح في تخريج المسند لشاكر