It is not permissible for a ruler to appoint as a judge someone who seeks it, and the one who is qualified for the judgeship is in grave danger.
Abu Musa (may Allah be pleased with him) said: I and two men from the sons of my paternal uncle went to the Messenger of Allah ﷺ. One of them said:
يا رسول الله أمرنا على بعض ما ولاك الله عزو جل
“O Messenger of Allah! Appoint us as governors over some of what Allah has given you authority over.”
Then the other said something similar, so the Prophet ﷺ said:
إنا والله لا نولى هذا العمل أحدا يسأله أو أحدا حرص عليه
“By Allah, we will not appoint to this work (governance) anyone who asks for it or is eager for it.”
[Bukhari: 7149, Kitab al-Ahkam: Bab ma yukrah min al-hirs ‘ala al-imarah, Muslim: 1733]
➊ Abu Hurayrah (may Allah be pleased with him) narrated that the Messenger of Allah ﷺ said:
من جعـل قـاضيـا بين الناس فقد ذبح بغير سكين
“Whoever is made a judge among the people has been slaughtered without a knife.”
[Sahih: Sahih al-Jami’ al-Saghir: 6190, Ahmad: 23/2, Abu Dawud: 3571, Kitab al-Aqdiyah: Bab fi talab al-qada’, Ibn Majah: 2308, Tirmidhi: 1325, Hakim: 91/4, Bayhaqi: 96/10, Daraqutni: 204/4, Ibn Hibban: 1375]
➋ ‘Abd Allah ibn Abi Awfa (may Allah be pleased with him) narrated that the Messenger of Allah ﷺ said:
إن الله مع القاضى ما لم يجر فإذا جار وكـلـه إلى نفسه
“Allah is with the judge as long as he does not act unjustly, but when he acts unjustly, Allah entrusts him to his own self.
And in Jami’ al-Tirmidhi the words are:
فإذا جـار تخلى عنه ولزمه الشيطان
“When the judge acts unjustly, Allah distances Himself from him and Satan clings to him.”
[Hasan: Sahih Ibn Majah: 1870, Kitab al-Ahkam: Bab al-taghlīz fi al-hayf wa al-rishwah, Ibn Majah: 2312, Tirmidhi: 1330, Hakim: 93/4, Bayhaqi in al-Sunan al-Kubra: 88/10, Ibn Hibban: 1540 – al-Mawarid]
➌ ‘Aishah (may Allah be pleased with her) narrated that the Messenger of Allah ﷺ said:
لتأتين على القاضي العدل يوم القيامة ساعة يتمنى أنه لم يقض بين اثنين فى تمرة قط
“A moment will certainly come upon the just judge on the Day of Resurrection in which he will wish that he had never judged between two people even in a matter of a single date.”
[Ahmad: 75/6, Majma’ al-Zawa’id: 195/4]
➍ Abu Dharr (may Allah be pleased with him) said to the Messenger of Allah ﷺ: Appoint me as a governor. So the Prophet ﷺ said:
إنك ضعيف وإنها أمانة وإنها يوم القيامة خزى وندامة إلا من أخذها بحقها وأدى الذى عليه فيها
“Indeed you are weak, and it is a trust, and it will surely be a cause of disgrace and regret on the Day of Resurrection, except for the one who takes it by its right and fulfils completely whatever his responsibility in it was.”
[Muslim: 1825, Kitab al-Imarah: Bab karahat al-imarah bighayr darurah, Ahmad: 173/5]
(Nawawi, may Allah have mercy on him) This hadith is a very great proof regarding avoiding authority and rule.
[Sharh Muslim: 450/6]