Caution: Translations of Quran and Ḥadīth may lead to possible misapplications and misinterpretations. This site is intended for students of sacred knowledge that are proficient in comprehending classical Arabic and have a strong foundation in Islamic sciences. Also note that religious injunctions rely on several aspects beyond what one may glean through reading individual aḥādīth.
suyuti:5501a

Verily, a man would perform the deeds of the people of Paradise for a long time, then his deeds would be concluded with the deeds of the people of Hell. And verily, a man would perform the deeds of the people of Hell for a long time, and then his deeds would be concluded with the deeds of the people of Paradise. (Using translation from Muslim 2651)   

السيوطي:٥٥٠١a

"إِنَّ الرَّجُلَ لَيَعْمَلُ الزَّمنَ الطَّويلَ بِعَمَلِ أهْلِ الْجَنَّةِ، ثُمَّ يَختِمُ الله عَمَلَهُ بِعَمَلِ أَهْل النَّارِ، فَيَجْعَلُه مِنْ أهْلِ النَّارِ، وإن الرَّجُلَ لَيَعْمَلُ الزَّمَن الطَّويلَ بَعمَلِ أهْلِ النَّارِ، ثُمَّ يَخْتِمُ الله عَمَلَهُ بَعَمل أَهْل الْجَنَّةِ فَيَجْعَلُهُ مِنْ أهْلِ الْجَنَّةِ فَيُدْخِلُهُ الْجَنَّةَ ".  

[حم] أحمد [م] مسلم عن أبي هريرة

See similar narrations below:

Collected by Muslim, Aḥmad, Ibn Ḥibbān
muslim:2651Qutaybah b. Saʿīd > ʿAbd al-ʿAzīz / Ibn Muḥammad > al-ʿAlāʾ from his father > Abū Hurayrah

Verily, a man would perform the deeds of the people of Paradise for a long time, then his deeds would be concluded with the deeds of the people of Hell. And verily, a man would perform the deeds of the people of Hell for a long time, and then his deeds would be concluded with the deeds of the people of Paradise.  

مسلم:٢٦٥١حَدَّثَنَا قُتَيْبَةُ بْنُ سَعِيدٍ حَدَّثَنَا عَبْدُ الْعَزِيزِ يَعْنِي ابْنَ مُحَمَّدٍ عَنِ الْعَلاَءِ عَنْ أَبِيهِ عَنْ أَبِي هُرَيْرَةَ

أَنَّ رَسُولَ اللَّهِ ﷺ قَالَ إِنَّ الرَّجُلَ لَيَعْمَلُ الزَّمَنَ الطَّوِيلَ بِعَمَلِ أَهْلِ الْجَنَّةِ ثُمَّ يُخْتَمُ لَهُ عَمَلُهُ بِعَمَلِ أَهْلِ النَّارِ وَإِنَّ الرَّجُلَ لَيَعْمَلُ الزَّمَنَ الطَّوِيلَ بِعَمَلِ أَهْلِ النَّارِ ثُمَّ يُخْتَمُ لَهُ عَمَلُهُ بِعَمَلِ أَهْلِ الْجَنَّةِ  

ahmad:10286ʿAbd al-Raḥman > Zuhayr > al-ʿAlāʾ from his father > Abū Hurayrah

Verily, a man would perform the deeds of the people of Paradise for a long time, then his deeds would be concluded with the deeds of the people of Hell. And verily, a man would perform the deeds of the people of Hell for a long time, and then his deeds would be concluded with the deeds of the people of Paradise. (Using translation from Muslim 2651)   

أحمد:١٠٢٨٦حَدَّثَنَا عَبْدُ الرَّحْمَنِ عَنْ زُهَيْرٍ عَنِ الْعَلَاءِ عَنْ أَبِيهِ عَنْ أَبِي هُرَيْرَةَ

عَنِ النَّبِيِّ ﷺ قَالَ إِنَّ الرَّجُلَ لَيَعْمَلُ الزَّمَانَ الطَّوِيلَ بِأَعْمَالِ أَهْلِ الْجَنَّةِ ثُمَّ يَخْتِمُ اللهُ لَهُ عَمَلَهُ بِأَعْمَالِ أَهْلِ النَّارِ فَيَجْعَلُهُ مِنْ أَهْلِ النَّارِ وَإِنَّ الرَّجُلَ لَيَعْمَلُ الزَّمَانَ الطَّوِيلَ بِأَعْمَالِ أَهْلِ النَّارِ ثُمَّ يَخْتِمُ اللهُ لَهُ عَمَلَهُ بِأَعْمَالِ أَهْلِ الْجَنَّةِ فَيَجْعَلُهُ مِنْ أَهْلِ الْجَنَّةِ فَيُدْخِلُهُ الْجَنَّةَ  

ذِكْرُ الْبَيَانِ بِأَنَّ تَفْصِيلَ هَذَا الْحَكَمِ يَكُونُ لِلْمَرْءِ عِنْدَ خَاتِمَةِ عَمَلِهِ دُونَ مَا يَنْقَلِبُ فِيهِ فِي حَيَاتِهِ

ibnhibban:6176Abū Khalīfah > al-Qaʿnabī > ʿAbd al-ʿAzīz b. Muḥammad > al-ʿAlāʾ b. ʿAbd al-Raḥman from his father > Abū Hurayrah

[Machine] Narrated Abu Huraira: The Messenger of Allah ﷺ said, "Verily, a man may perform the deeds of the people of Paradise throughout a lengthy period of time, then Allah seals it for him with the deeds of the people of the Fire, so he becomes from the people of the Fire. And verily, a man may perform the deeds of the people of the Fire throughout a lengthy period of time, then Allah seals it for him with the deeds of the people of Paradise, so he becomes from the people of Paradise."  

ابن حبّان:٦١٧٦أَخْبَرَنَا أَبُو خَلِيفَةَ

حَدَّثَنَا الْقَعْنَبِيُّ حَدَّثَنَا عَبْدُ الْعَزِيزِ بْنُ مُحَمَّدٍ عَنِ الْعَلَاءِ بْنِ عَبْدِ الرَّحْمَنِ عَنْ أَبِيهِ عَنْ أَبِي هُرَيْرَةَ أَنَّ رَسُولَ اللَّهِ ﷺ قَالَ «إِنَّ الرَّجُلَ لَيَعْمَلُ الزَّمَانَ الطَّوِيلَ بِعَمَلِ أَهْلِ الْجَنَّةِ ثُمَّ يَخْتِمُ اللَّهُ لَهُ بِعَمَلِ أَهْلِ النَّارِ فَيَجْعَلُهُ مِنْ أَهْلِ النَّارِ وَإِنَّ الرَّجُلَ لَيَعْمَلُ الزَّمَانَ الطَّوِيلَ بِعَمَلِ أَهْلِ النَّارِ ثُمَّ يَخْتِمُ اللَّهُ لَهُ بِعَمَلِ أَهْلِ الْجَنَّةِ فَيَجْعَلُهُ مِنْ أَهْلِ الْجَنَّةِ»