It is narrated from Amr bin Al-Aas (may Allah be pleased with him) that he heard the Messenger of Allah (ﷺ) saying: "When a ruler exercises ijtihad (independent judgment) and his decision is correct, he will have a double reward; and when a ruler exercises ijtihad and makes a mistake, he will have a single reward."
Hadith Referenceمسند الإمام الشافعي / كتاب القضاء والأحكام والدعاوى والبينات واليمين ومع الشاهد والأيمان والشهادات / 1685
Hadith Takhrijاخرجه البخاري، الاعتصام بالكتاب والسنة، باب اجر الحاكم اذا اجتهد فأصاب أو اخطا (7352) ۔ ومسلم، الأقضية، باب بیان اجر الحاكم اذا اجتهد، فأصاب أو أخطا (1716)۔