Sahih Muslim 142 d
Narration text is preserved in its supplied Arabic and English. Translated interfaces and reading guides do not add narration translations in other languages.
مَا مِنْ أَمِيرٍ يَلِي أَمْرَ الْمُسْلِمِينَ ثُمَّ لاَ يَجْهَدُ لَهُمْ وَيَنْصَحُ إِلاَّ لَمْ يَدْخُلْ مَعَهُمُ الْجَنَّةَ "
It is narrated on the authority of Abu Malih that Ubaidullah b. Ziyad visited Ma'qil b. Yasar in his illness. Ma'qil said to him:
I am narrating to you a hadith which I would have never narrated to you had I not been in death-bed. I heard Allah's apostle (ﷺ) say: A ruler who has been entrusted with the affairs of the Muslims but he makes no endeavors ( for the material and moral uplift) and does not sincerely mean (their welfare) would not enter Paradise along with them.
Full reference and source
Sahih Muslim 142 d In-book : Book 1, Hadith 273 USC-MSA web (English) : Book 1, Hadith 264 (deprecated)
View source on Sunnah.com (opens in a new tab)