This verse was revealed about us, the clan of Banu Salama, "and do not call one another by offensive nicknames. How wretched is a name of disobedience after having faith" [Hujurat 49:11].He said, the Messenger of Allah ﷺ came to us at a time when there was not one of us who did not have two or three names. So when the Prophet ﷺ would call out, "So-and-so," the people would say, "Stop, Messenger of Allah, he gets angry at that name."So this verse was revealed, "and do not call one another by offensive nicknames" [Hujurat 49:11].
حدثنا موسى بن إسمعيل حدثنا وهيب عن داود عن عامر قال
فينا نزلت هذه الآية في بني سلمة {ولا تنابزوا بالألقاب بئس الاسم الفسوق بعد الإيمان} قال قدم علينا رسول الله ﷺ وليس منا رجل إلا وله اسمان أو ثلاثة فجعل النبي ﷺ يقول يا فلان فيقولون مه يا رسول الله إنه يغضب من هذا الاسم فأنزلت هذه الآية {ولا تنابزوا بالألقاب}
[Its chain is sahih] Ibn Majah narrated it in the Book of Manners, Chapter on Nicknames, no. 3741, and Tirmidhi, no. 3268, from the hadith of Dawud bin Abu Hind, through this route, and he said, hasan. Hakim graded it sahih according to the criterion of Muslim, 2/463 and 4/181, 182.