Mishkat al-Masabih
Anas reported God’s Messenger as saying, “If anyone desires and asks for the office of qadi he will be left to his own devices, but if anyone is forced to accept it God will send down an angle who will direct him aright.” Tirmidhi, Abu Dawud and Ibn Majah transmitted it.
وَعَنْ أَنَسٍ قَالَ: قَالَ رَسُولُ اللَّهِ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ: «مَنِ ابْتَغَى الْقَضَاءَ وَسَأَلَ وُكِلَ إِلَى نَفْسِهِ وَمَنْ أُكْرِهَ عَلَيْهِ أَنْزَلَ اللَّهُ عَلَيْهِ مَلَكًا يُسَدِّدُهُ» . رَوَاهُ التِّرْمِذِيُّ وَأَبُو دَاوُد وَابْن مَاجَه
Reference