(1) باب النَّهْىِ عَنِ التَّكَنِّي، بِأَبِي الْقَاسِمِ وَبَيَانِ مَا يُسْتَحَبُّ مِنَ الأَسْمَاءِ .
Jabir b. 'Abdullah reported that a child was born to a person from the Ansar and he made up his mind to give him the name of Muhammad. He came to Allah's Apostle (ﷺ) and, asked him (about it), whereupon he said:
The Ansar have done well to give the name (to your children) after my name, but do not give them the kunya after my kunya.
Reference: Sahih Muslim 2133 f
In-book reference: Book 38, Hadith 8
USC-MSA web (English) reference(deprecated numbering scheme): Book 25, Hadith 5321