كتاب الإمارة
33  
The Book on Government
(5)
Chapter: The virtue of a just ruler and the punishment of a tyrant; Encouragement to treat those under one's authority with kindness and the prohibition against causing them hardship
(5)
باب فَضِيلَةِ الإِمَامِ الْعَادِلِ وَعُقُوبَةِ الْجَائِرِ وَالْحَثِّ عَلَى الرِّفْقِ بِالرَّعِيَّةِ وَالنَّهْيِ عَنْ إِدْخَالِ الْمَشَقَّةِ عَلَيْهِمْ
Sahih Muslim 142 g

It has been narrated on the authority of Abu Malik that Ubaidullah b. Ziyad visited Ma'qil b. Yaser in the latter's illness. Ma'qil said to him:

I am narrating to you a tradition. If I were not at death's door, I would not narrate it to you. I heard the Messenger of Allah (may peace he upon him) say: A ruler who, having obtained control over the affairs of the Muslims, does not strive for their betterment and does not serve them sincerely shall not enter Paradise with them.
وَحَدَّثَنَا أَبُو غَسَّانَ الْمِسْمَعِيُّ، وَإِسْحَاقُ بْنُ إِبْرَاهِيمَ، وَمُحَمَّدُ بْنُ الْمُثَنَّى، قَالَ إِسْحَاقُ أَخْبَرَنَا وَقَالَ الآخَرَانِ، حَدَّثَنَا مُعَاذُ بْنُ هِشَامٍ، حَدَّثَنِي أَبِي، عَنْ قَتَادَةَ، عَنْ أَبِي الْمَلِيحِ، أَنَّإِنِّي مُحَدِّثُكَ بِحَدِيثٍ لَوْلاَ أَنِّي فِي الْمَوْتِ لَمْ أُحَدِّثْكَ بِهِ سَمِعْتُ رَسُولَ اللَّهِ صلى الله عليه وسلم يَقُولُ ‏ "‏ مَا مِنْ أَمِيرٍ يَلِي أَمْرَ الْمُسْلِمِينَ ثُمَّ لاَ يَجْهَدُ لَهُمْ وَيَنْصَحُ إِلاَّ لَمْ يَدْخُلْ مَعَهُمُ الْجَنَّةَ ‏"‏ ‏.‏
Reference : Sahih Muslim 142g
In-book reference : Book 33, Hadith 30
USC-MSA web (English) reference : Book 20, Hadith 4502
  (deprecated numbering scheme)