(35) باب الأَلْقَابِ
It was narrated that Abu Jabirah bin Dahhak said:
"(Allah's saying) "Nor insult one another by nicknames(Surah Al Hujarat 49:11)" was revealed concerning us, the Ansar. When the Prophet(ﷺ) came to us, a man among us would have two or three names, and the Prophet(ﷺ) might call him by one of those names, only to be told: "O Messenger of Allah(ﷺ), he does not like that name." Then:"Nor insult one another by nicknames." was revealed."
Reference: Sunan Ibn Majah 3741
In-book reference: Book 33, Hadith 86
English translation: Vol. 5, Book 33, Hadith 3741