According to the Shari‘ah, it is not permissible
for a person who adopts a foundling to pass on the family name to them, whereby the foundling is given the name of the foster father and is ascribed to him as a child to its own father or tribe, as described in the question. This involves lying, falsehood, confusion of lineage, and a threat to people’s honor. It changes the lines of inheritance, and may result in someone who has no rights receiving a share and rightful heirs being deprived of theirs. Moreover, it may cause people to err and regard what is Haram (prohibited) as Halal (lawful) and what is Halal as Haram in matters of Khulwah (being alone with a member of the opposite sex) and marriage. It can also lead them to violate other prohibitions and trespass the boundaries set by the Shari‘ah. Allah, therefore, made it Haram to attribute a child to anyone other than its real father and the Prophet (peace be upon him) cursed those who attribute themselves to other than their father or their emancipating master. (Part No. 16; Page No. 7) Allah (Exalted be He) says (what means):
...nor has He made your adopted sons your real sons. That is but your saying with your mouths. But Allâh says the truth, and He guides to the (Right) Way.
Call them (adopted sons) by (the names of) their fathers: that is more just with Allâh. But if you know not their father’s (names, call them) your brothers in faith and Mawâlîkum (your freed slaves). And there is no sin on you concerning that in which you made a mistake, except in regard to what your hearts deliberately intend. And Allâh is Ever Oft-Forgiving, Most Merciful.
The Prophet (peace be upon him) said,
Whoever knowingly claims to belong to anyone other than their own father, Jannah (Paradise) will be forbidden to them.
(Related by Ahmad,
The Prophet (peace be upon him) also said,
Anyone who claims to belong to anyone other than their father, or attributes themselves to other than their emancipating master, on them shall be inflicted the continuous Curse of Allah until the Day of Resurrection.
The questioner’s uncle did wrong when he acted according to his personal reasoning and gave his name to the child in question. (Part No. 16; Page No. 8) This state of affairs must not be allowed to continue. It is obligatory to change it and put matters right according to the Nusus (Islamic texts from the Qur’an or the Sunnah) that declare this naming to be Haram and also the above-mentioned ruling. As for being kind to a foundling, bringing him up, and treating him well, this is a benevolent deed that is encouraged by the Shari‘ah. May Allah grant us success. May peace and blessings be upon our Prophet Muhammad, his family, and Companions.