This verse was revealed about us, the company of the Ansar, "and do not insult one another with nicknames" [Hujurat 49:11]. The Prophet ﷺ came to us, and a man among us would have two or three names. The Prophet ﷺ would sometimes call them by one of those names, and someone would say, "Messenger of Allah, he becomes angry at this name." So the verse was revealed, "and do not insult one another with nicknames" [Hujurat 49:11].
حدثنا أبو بكر حدثنا عبد الله بن إدريس عن داود عن الشعبي
فينا نزلت معشر الأنصار ولا تنابزوا بالألقاب قدم علينا النبي ﷺ والرجل منا له الاسمان والثلاثة فكان النبي ﷺ ربما دعاهم ببعض تلك الأسماء فيقال يا رسول الله إنه يغضب من هذا فنزلت ولا تنابزوا بالألقاب
No references are available.
[Its chain of transmission is sahih] Abu Dawud narrated it in the Book of Manners, Chapter on Nicknames, no. 4962, from the hadith of Dawud bin Abu Hind, through this route. Tirmidhi said in 3268, hasan sahih, and Hakim graded it sahih according to the criteria of Muslim, 2/463, 4/181,182.