Mishkat
al-Masabih
مشكاة المصابيح
The Offices of Commander and Qadi
كتاب الإمارة والقضاء
Chapter 2b: How to Conduct the Office of Qadi, and Fear of it - Section 2
باب العمل في القضاء والخوف منه - الفصل الثاني
Mishkat al-Masabih 3735
Buraida reported Allah's Messenger ﷺ as saying, "Qadis are of three types, one of whom will go to paradise and two to hell. The one who will go to paradise is a man who knows what is right and gives judgment accordingly; but a man who knows what is right and acts tyrannically in his judgment will go to hell, and a man who gives judgment for people when he is ignorant will go to hell.” Abu Dawud and Ibn Majah transmitted it.
وَعَنْ بُرَيْدَةَ قَالَ: قَالَ رَسُولُ اللَّهِ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ: " الْقُضَاةُ ثَلَاثَةٌ: وَاحِدٌ فِي الْجَنَّةِ وَاثْنَانِ فِي النَّارِ فَأَمَّا الَّذِي فِي الْجَنَّةِ فَرَجُلٌ عَرَفَ الْحَقَّ فَقَضَى بِهِ وَرَجُلٌ عَرَفَ الْحَقَّ فَجَارَ فِي الْحُكْمِ فَهُوَ فِي النَّارِ وَرَجُلٌ قَضَى لِلنَّاسِ عَلَى جَهْلٍ فَهُوَ فِي النَّارِ ". رَوَاهُ أَبُو دَاوُدَ وَابْنُ مَاجَهْ
In-book reference: Mishkat al-Masabih Book 18 Chapter 2b Hadith 1