Sayyiduna Anas (may Allah be pleased with him) said: The Messenger of Allah (peace and blessings be upon him) gave me my kunyah while I was still a boy, and he (peace and blessings be upon him) gave me the kunyah after a herb that I used to pick.
Hadith Referenceالمعجم الكبير للطبراني / باب الألف / 652