When he came as part of a delegation to the Messenger of Allah ﷺ with his people, the Prophet ﷺ heard them addressing him by the kunya Abu Hakam. So the Messenger of Allah ﷺ called him over and said, "Allah alone is Hakam, the Judge, and to Him belongs all judgment. Why then are you given the kunya Abu Hakam?"He replied, "When my people differ over something, they come to me and I judge between them, and both parties are satisfied with my ruling."The Messenger of Allah ﷺ said, "How excellent this is. How many children do you have?"He said, "I have Shurayh, Muslim, and Abdullah."The Prophet ﷺ asked, "Which of them is the eldest?"I said, "Shurayh."He said, "Then you are Abu Shurayh."
حدثنا الربيع بن نافع عن يزيد يعني ابن المقدام بن شريح عن أبيه عن جده شريح
أنه لما وفد إلى رسول الله ﷺ مع قومه سمعهم يكنونه بأبي الحكم فدعاه رسول الله ﷺ فقال إن الله هو الحكم وإليه الحكم فلم تكنى أبا الحكم فقال إن قومي إذا اختلفوا في شيء أتوني فحكمت بينهم فرضي كلا الفريقين فقال رسول الله ﷺ ما أحسن هذا فما لك من الولد قال لي شريح ومسلم وعبد الله قال فمن أكبرهم قلت شريح قال فأنت أبو شريح
[Its isnad is hasan] Nasai narrated it in Aadab al-Qudat, chapter "If They Appoint a Man as Judge and He Rules": 5389, from the hadith of Yazid bin Miqdam, with this wording. Hakim also narrated it, 23/1, and Ibn Hibban graded it sahih, with a shorter version between them, h: 1937.