One of his paternal uncles reported that when the Prophet ﷺ arrived, there was not one of us who did not have a nickname or two. So whenever he called a man by his nickname, we would say, "Messenger of Allah, he dislikes that." Then the verse was revealed, "and do not insult one another with nicknames" [Hujurat 49:11].
وجدت في كتاب أبي بخط يده حفص بن غياث حدثنا داود بن أبي هند عن الشعبي عن أبي جبيرة بن الضحاك الأنصاري عن عمومة له قدم النبي ﷺ وليس أحد منا إلا له لقب أو لقبان قال فكان إذا دعا رجلا بلقبه قلنا يا رسول الله إن هذا يكره هذا قال فنزلت {ولا تنابزوا بالألقاب}