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.
quran:9:128

There has certainly come to you a Messenger from among yourselves. Grievous to him is what you suffer; ˹he is˺ concerned over you and to the believers is kind and merciful.  

Verily there has come to you a messenger from among yourselves, that is, one of you — Muhammad (s) — for whom it is grievous, hard, that you should suffer, that is, your suffering, your experiencing hardship and encountering harm ˹is hard on him˺; who is full of concern for you, that you should be rightly guided; to the believers full of pity, profoundly compassionate, merciful, desiring good for them.
القرآن:٩:١٢٨

لَقَدْ جَاءَكُمْ رَسُولٌ مِنْ أَنْفُسِكُمْ عَزِيزٌ عَلَيْهِ مَا عَنِتُّمْ حَرِيصٌ عَلَيْكُمْ بِالْمُؤْمِنِينَ رَءُوفٌ رَحِيمٌ  

{لقد جاءكم رسول من أنفسكم} أي منكم: محمد ﷺ {عزيز} شديد {عليه ما عَنِتُّم} أي عنتكم، أي مشقتكم ولقاءكم المكروه {حريص عليكم} أن تهتدوا {بالمؤمنين رءوف} شديد الرحمة {رحيم} يريد لهم الخير.

See similar narrations below:

Collected by Ḥākim
hakim:3296Abū al-ʿAbbās Muḥammad b. Yaʿqūb > Bakkār b. Qutaybah al-Qāḍī > Abū ʿĀmir ʿAbd al-Malik b. ʿAmr al-ʿAqadī > Shuʿbah > Yūnus b. ʿUbayd And ʿAlī b. Zayd > Yūsuf b. Mihrān > Ibn ʿAbbās > Ubay b. Kaʿb

[Machine] "The last revelation of the Quran: 'Certainly there has come to you a Messenger from among yourselves. Grievous to him is your suffering; [he is] concerned over you [i.e., your guidance] and to the believers is kind and merciful' [Quran 9:128]. The hadeeth is narrated by Shu'bah on the authority of Yunus ibn 'Ubaid as authentic according to the conditions of the two sheikhs [i.e., Bukhari and Muslim], but they did not include it [in their collections]."  

الحاكم:٣٢٩٦حَدَّثَنَا أَبُو الْعَبَّاسِ مُحَمَّدُ بْنُ يَعْقُوبَ ثنا بَكَّارُ بْنُ قُتَيْبَةَ الْقَاضِي ثنا أَبُو عَامِرٍ عَبْدُ الْمَلِكِ بْنِ عَمْرٍو الْعَقَدِيُّ ثنا شُعْبَةُ عَنْ يُونُسَ بْنِ عُبَيْدٍ وَعَلِيِّ بْنِ زَيْدٍ عَنْ يُوسُفَ بْنِ مِهْرَانَ عَنِ ابْنِ عَبَّاسٍ عَنْ أُبَيِّ بْنِ كَعْبٍ قَالَ

«آخِرُ مَا نَزَلَ مِنَ الْقُرْآنِ {لَقَدْ جَاءَكُمْ رَسُولٌ مِنْ أَنْفُسِكُمْ عَزِيزٌ عَلَيْهِ مَا عَنِتُّمْ حَرِيصٌ عَلَيْكُمْ بِالْمُؤْمِنِينَ رَءُوفٌ رَحِيمٌ} » حَدِيثُ شُعْبَةَ عَنْ يُونُسَ بْنِ عُبَيْدٍ «صَحِيحٌ عَلَى شَرْطِ الشَّيْخَيْنِ وَلَمْ يُخْرِجَاهُ» على شرط البخاري ومسلم