Caution: Translations of Quran and Ḥadīth may lead to possible misapplications and misinterpretations. This site is intended for students of sacred knowledge that are proficient in comprehending classical Arabic and have a strong foundation in Islamic sciences. Also note that religious injunctions rely on several aspects beyond what one may glean through reading individual aḥādīth.
nasai:5399Muḥammad b. Bashhār > Abū ʿĀmir > Sufyān > al-Shaybānī > al-Shaʿbī > Shurayḥ > Katab > ʿUmar Yasʾaluh Fakatab Ilayh

He wrote to 'Umar, to ask him (a question), and 'Umar wrote back to him telling him: "Judge according to what is in the Book of Allah. If it is not (mentioned) in the Book of Allah, then (judge) according to the Sunnah of the Messenger of Allah [SAW]. If it is not (mentioned) in the Book of Allah or the Sunnah of the Messenger of Allah [SAW], then pass judgment according to the way the righteous passed judgment. If it is not (mentioned) in the Book of Allah, or the Sunnah of the Messenger of Allah [SAW], and the righteous did not pass judgment concerning it, then if you wish, go ahead (and try to work it out by yourself) or if you wish, leave it. And I think that leaving it is better for you. And peace be upon you."  

النسائي:٥٣٩٩أَخْبَرَنَا مُحَمَّدُ بْنُ بَشَّارٍ قَالَ حَدَّثَنَا أَبُو عَامِرٍ قَالَ حَدَّثَنَا سُفْيَانُ عَنِ الشَّيْبَانِيِّ عَنِ الشَّعْبِيِّ عَنْ شُرَيْحٍ

أَنَّهُ كَتَبَ إِلَى عُمَرَ يَسْأَلُهُ فَكَتَبَ إِلَيْهِ أَنِ اقْضِ بِمَا فِي كِتَابِ اللَّهِ فَإِنْ لَمْ يَكُنْ فِي كِتَابِ اللَّهِ فَبِسُنَّةِ رَسُولِ اللَّهِ ﷺ فَإِنْ لَمْ يَكُنْ فِي كِتَابِ اللَّهِ وَلاَ فِي سُنَّةِ رَسُولِ اللَّهِ ﷺ فَاقْضِ بِمَا قَضَى بِهِ الصَّالِحُونَ فَإِنْ لَمْ يَكُنْ فِي كِتَابِ اللَّهِ وَلاَ فِي سُنَّةِ رَسُولِ اللَّهِ ﷺ وَلَمْ يَقْضِ بِهِ الصَّالِحُونَ فَإِنْ شِئْتَ فَتَقَدَّمْ وَإِنْ شِئْتَ فَتَأَخَّرْ وَلاَ أَرَى التَّأَخُّرَ إِلاَّ خَيْرًا لَكَ وَالسَّلاَمُ عَلَيْكُمْ  


See similar narrations below:

Collected by Nasāʾī's Kubrá, Suyūṭī
nasai-kubra:5911Muḥammad b. Bashhār > Abū ʿĀmir > Sufyān > al-Shaybānī > al-Shaʿbī > Shurayḥ > Katab > ʿUmar Yasʾaluh Fakatab Ilayh

He wrote to 'Umar, to ask him (a question), and 'Umar wrote back to him telling him: "Judge according to what is in the Book of Allah. If it is not (mentioned) in the Book of Allah, then (judge) according to the Sunnah of the Messenger of Allah [SAW]. If it is not (mentioned) in the Book of Allah or the Sunnah of the Messenger of Allah [SAW], then pass judgment according to the way the righteous passed judgment. If it is not (mentioned) in the Book of Allah, or the Sunnah of the Messenger of Allah [SAW], and the righteous did not pass judgment concerning it, then if you wish, go ahead (and try to work it out by yourself) or if you wish, leave it. And I think that leaving it is better for you. And peace be upon you." (Using translation from Nasāʾī 5399)  

الكبرى للنسائي:٥٩١١أَخْبَرَنَا مُحَمَّدُ بْنُ بَشَّارٍ قَالَ حَدَّثَنَا أَبُو عَامِرٍ قَالَ حَدَّثَنَا سُفْيَانُ عَنِ الشَّيْبَانِيِّ عَنِ الشَّعْبِيِّ عَنْ شُرَيْحٍ أَنَّهُ كَتَبَ إِلَى عُمَرَ يَسْأَلُهُ فَكَتَبَ إِلَيْهِ

«أَنِ اقْضِ بِمَا فِي كِتَابِ اللهِ فَإِنْ لَمْ يَكُنْ فِي كِتَابِ اللهِ فَبِسُنَّةِ رَسُولِ اللهِ ﷺ فَإِنْ لَمْ يَكُنْ فِي كِتَابِ اللهِ وَلَا سُنَّةِ رَسُولِ اللهِ ﷺ فَاقْضِ بِمَا قَضَى بِهِ الصَّالِحُونَ فَإِنْ لَمْ يَكُنْ فِي كِتَابِ اللهِ وَلَا فِي سُنَّةِ رَسُولِ اللهِ ﷺ وَلَمْ يَقْضِ بِهِ الصَّالِحُونَ فَإِنْ شِئْتَ فَتَقَدَّمْ وَإِنْ شِئْتَ فَتَأَخَّرْ وَلَا أَرَى التَّأَخُّرَ إِلَّا خَيْرًا لَكَ وَالسَّلَامُ عَلَيْكُمْ»  

suyuti:2-3576bal-Shaʿbi
Request/Fix translation

  

السيوطي:٢-٣٥٧٦b

"عَنِ الشَّعْبِىِّ قَاَل: كَتَبَ عُمَرُ إِلَى شُرَيْحٍ: إِذَا أَتَاكَ أَمْرٌ فِى كِتَابِ اللهِ وَكَانَ في سُنَّةِ رَسُول اللهِ ﷺ فَاقْضِ بِهِ (ولاَ يَلْفِتَنَّكَ الرِّجَالُ عنه) فإنْ لَمْ يَكُنْ في كِتَابِ الله وَكانَ في سُنَّةِ رَسُولِهِ فَاقْضِ به (فإِن لم يكن في كتَاب اللهِ، وَكان في سُنَّة رسول اللهِ فَاقْضِ بما قَضىَ به أئمة الهدى)، فَإِنْ لَمْ يَكُنْ في كِتابِ اللهِ وَلاَ في سُنَّةِ رَسُولِهِ وَلاَ فِيما قَضى بِه أَئِمَّةُ الْهُدَى فَأَنْتَ بِالْخِيَارِ إِنْ شِئْتَ تَجْتَهِدُ رَأيَكَ، وَإِنْ شِئْتَ أَنْ تُؤامِرَنِى، وَلاَ أَرَى لك مُؤامَرَتَكَ إِيَّاىَ إلاَّ أَسْلَمَ لَكَ".  

[ص] سعيد بن منصور [ق] البيهقى في السنن