All perfect praise be to Allah, The Lord of the Worlds. I testify that there is none worthy of worship except Allah, and that Muhammad, ﷺ, is His slave and Messenger.
There is no harm in changing your surname if, according to prevailing customs and common usage, it is not used to indicate lineage or birth (ancestry). In this case, it is similar to attributing oneself to a particular country, place, trade, or profession. Such forms of attribution have been commonly used without objection, and scholars have not regarded changing them as equivalent to changing one’s actual lineage.
Al-Khattabi stated in A‘lam al-Hadith: “[There are forms of attribution based on] countries and homelands, [as well as attribution based on] trades and professions. In either of these two cases, it is permissible for a person to change from one attribution to another... A person who settles in a particular town or country may attribute himself to it if he has resided there for a long period and becomes known among people by that [particular town or country]. This has been a customary practice in both ancient and more recent times. As for adopting new forms of attribution and titles based on trades and professions, the matter is even more flexible and permissible than the former.” [End of quote]
However, changing one’s surname becomes prohibited if it indicates an attribution of lineage to someone other than one’s father. It is narrated by al-Bukhari and Muslim from Sa’d ibn Abi Waqqas
that he heard the Prophet ﷺ say: “Whoever claims to be the son of someone other than his father, knowing that he is not his father, Paradise is forbidden to him.”
Ibn Daqiq al-‘Id
said in Ihkam al-Ahkam, in his commentary on the hadith of Abu Dharr
: “‘There is no man who claims [lineage] to other than his father...’ This indicates that it is forbidden to disown a known lineage and to attribute oneself to the lineage of another. There is no doubt that this is a major sin, because of the great harms connected with it.” [End of quote]
Allah Knows best.