Language:
كتاب الأحكام
93  
Judgments (Ahkaam)
(6)
Chapter: He who seeks to be a ruler will be held responsible
(6)
باب مَنْ سَأَلَ الإِمَارَةَ وُكِلَ إِلَيْهَا
Sahih al-Bukhari 7147

Narrated `Abdur-Rahman bin Samura:

Allah's Messenger (ﷺ) said, "O `Abdur-Rahman bin Samura! Do not seek to be a ruler, for if you are given authority on your demand, you will be held responsible for it, but if you are given it without asking for it, then you will be helped (by Allah) in it. If you ever take an oath to do something and later on you find that something else is better, then do what is better and make expiation for your oath."

حَدَّثَنَا أَبُو مَعْمَرٍ، حَدَّثَنَا عَبْدُ الْوَارِثِ، حَدَّثَنَا يُونُسُ، عَنِ الْحَسَنِ، قَالَ حَدَّثَنِي عَبْدُ الرَّحْمَنِ بْنُ سَمُرَةَ، قَالَ قَالَ لِي رَسُولُ اللَّهِ صلى الله عليه وسلم ‏ "‏ يَا عَبْدَ الرَّحْمَنِ بْنَ سَمُرَةَ، لاَ تَسْأَلِ الإِمَارَةَ، فَإِنْ أُعْطِيتَهَا عَنْ مَسْأَلَةٍ وُكِلْتَ إِلَيْهَا، وَإِنْ أُعْطِيتَهَا عَنْ غَيْرِ مَسْأَلَةٍ أُعِنْتَ عَلَيْهَا، وَإِذَا حَلَفْتَ عَلَى يَمِينٍ فَرَأَيْتَ غَيْرَهَا خَيْرًا مِنْهَا، فَأْتِ الَّذِي هُوَ خَيْرٌ، وَكَفِّرْ عَنْ يَمِينِكَ ‏"‏‏.‏
Reference : Sahih al-Bukhari 7147
In-book reference : Book 93, Hadith 11
USC-MSA web (English) reference : Vol. 9, Book 89, Hadith 261
  (deprecated numbering scheme)