Sahih al-Bukhari 84:15
Narrated `Abdur-Rahman bin Samura:
Allah's Messenger (ﷺ) said, "(O `Abdur-Rahman!) Do not seek to be a ruler, for, if you are given the authority of ruling without your asking for it, then Allah will help you; but if you are given it by your asking, then you will be held responsible for it (i.e. Allah will not help you ) . And if you take an oath to do something and later on find another thing, better than that, then do what is better and make expiation for (the dissolution of) your oath."
Reference
Sahih al-Bukhari 84:15
In-book reference
Book 84, Hadith 15
Arabic Text
حَدَّثَنِي مُحَمَّدُ بْنُ عَبْدِ اللَّهِ، حَدَّثَنَا عُثْمَانُ بْنُ عُمَرَ بْنِ فَارِسٍ، أَخْبَرَنَا ابْنُ عَوْنٍ، عَنِ الْحَسَنِ، عَنْ عَبْدِ الرَّحْمَنِ بْنِ سَمُرَةَ، قَالَ قَالَ رَسُولُ اللَّهِ صلى الله عليه وسلم " لاَ تَسْأَلِ الإِمَارَةَ، فَإِنَّكَ إِنْ أُعْطِيتَهَا عَنْ غَيْرِ مَسْأَلَةٍ أُعِنْتَ عَلَيْهَا، وَإِنْ أُعْطِيتَهَا عَنْ مَسْأَلَةٍ وُكِلْتَ إِلَيْهَا، وَإِذَا حَلَفْتَ عَلَى يَمِينٍ فَرَأَيْتَ غَيْرَهَا خَيْرًا مِنْهَا، فَأْتِ الَّذِي هُوَ خَيْرٌ، وَكَفِّرْ عَنْ يَمِينِكَ ". تَابَعَهُ أَشْهَلُ عَنِ ابْنِ عَوْنٍ. وَتَابَعَهُ يُونُسُ وَسِمَاكُ بْنُ عَطِيَّةَ وَسِمَاكُ بْنُ حَرْبٍ وَحُمَيْدٌ وَقَتَادَةُ وَمَنْصُورٌ وَهِشَامٌ وَالرَّبِيعُ.