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.
ahmad:8233

[Machine] And the Messenger of Allah, ﷺ , said: "What a great blessing for a slave to be taken while in the good worship of Allah and the company of His Prophet, what a great blessing for him."  

أحمد:٨٢٣٣

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


See similar narrations below:

Collected by Muslim, Aḥmad, Suyūṭī
muslim:1667Muḥammad b. Rāfiʿ > ʿAbd al-Razzāq > Maʿmar > Hammām b. Munabbih > Hadhā Mā > Abū Hurayrah

It is good for a slave that he worships Allah well, and serves his master (well). It is good for him.  

مسلم:١٦٦٧وَحَدَّثَنَا مُحَمَّدُ بْنُ رَافِعٍ حَدَّثَنَا عَبْدُ الرَّزَّاقِ حَدَّثَنَا مَعْمَرٌ عَنْ هَمَّامِ بْنِ مُنَبِّهٍ قَالَ هَذَا مَا حَدَّثَنَا أَبُو هُرَيْرَةَ

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

ahmad:7655ʿAbd al-Razzāq > Maʿmar > Hammām > Abū Hurayrah

[Machine] The Messenger of Allah ﷺ said: "What a blessing it is for a servant that Allah will take his soul while he is in a state of worshiping his Lord and obeying his master. What a blessing it is for him."  

أحمد:٧٦٥٥حَدَّثَنَا عَبْدُ الرَّزَّاقِ حَدَّثَنَا مَعْمَرٌ عَنْ هَمَّامٍ عَنْ أَبِي هُرَيْرَةَ قَالَ

قَالَ رَسُولُ اللهِ ﷺ نِعِمَّا لِلْعَبْدِ أَنْ يَتَوَفَّاهُ اللهُ بِحُسْنِ عِبَادَةِ رَبِّهِ وَبِطَاعَةِ سَيِّدِهِ نِعِمَّا لَهُ وَنِعِمَّا لَهُ