Jami` at-Tirmidhi, Book 15, Hadith 3 (In-Book)

Anas bin Malik narrated that the Messenger of Allah (sallAllahu Alayhi wa sallam) said: "Whoever asks for a position as a judge, then he left on his own. And whoever is forced onto it, Allah sends an angel down to him so that he can be correct." (Daif)

حَدَّثَنَا هَنَّادٌ، حَدَّثَنَا وَكِيعٌ، عَنْ إِسْرَائِيلَ، عَنْ عَبْدِ الأَعْلَى، عَنْ بِلاَلِ بْنِ أَبِي مُوسَى، عَنْ أَنَسِ بْنِ مَالِكٍ، قَالَ قَالَ رَسُولُ اللَّهِ صلى الله عليه وسلم ‏ "‏ مَنْ سَأَلَ الْقَضَاءَ وُكِلَ إِلَى نَفْسِهِ وَمَنْ أُجْبِرَ عَلَيْهِ يُنْزِلُ اللَّهُ عَلَيْهِ مَلَكًا فَيُسَدِّدُهُ ‏" ‏ ‏.‏

sunnah.com