Answer: Dear questioner:
Al-Salâm `Alaykum wa Rahmah Allah wa Barakâtuh.
There cannot possibly be a hadîth that curses someone for changing his or her "surname". This is because the very idea of a "surname" is something that came much later in history. There were no last names at the time of the Prophet (peace be upon him) and for centuries later
The names like "al-Shâfi`î"or "al-Bukhârî" "al-Samarqnadî" and the like may seem to us like surnames. However, in truth they were added on to a person's name as en extra identifying term. Sometimes they indicated a person's tribe or clan. But more often they indicated his country, region, town of origin, or profession. Such names were not necessarily passed down from generation to generation.
As for the person's name, it was given as so-and-so the son of so-and-so the son of so-and-so…
This does not mean we should adopt this system today. Especially since tacking on such attributes will be misunderstood in a modern context. What matters is that we attribute ourselves to our true lineage according to the customs in the country which are understood in that country. The important thing is that the child is properly attributed to his or her father’s family. You should follow the local custom in this matter.
The surname is how lineage is indicated today. Therefore, you should keep your father's name if you were born in wedlock or if your father otherwise claimed paternity. Otherwise, you should retain your mother's family name.
In any event, if you have already legally changed your name, it is not necessary to go back and change it back again on paper. keep your name as it is if you like. What matters, however, is that you do not deny your true lineage or deny your parentage. The worst thing is to deny your parentage or lie about it and claim to be the child of someone you are not. You cannot deny the biological fact of your lineage through which Allah created you.
The Prophet (peace be upon him) said: “Whoever attributes his lineage to other than his father or claims other than his master as his master, then he has upon him the curse of Allah, His angels, and all humanity.” [Sunan Abî Dâwûd (5115) from Anas and Sunan Ibn Mâjah (2609) from Sa`îd b. Jubayr – the wording is that of Ibn Mâjah]
The Prophet (peace be upon him) said: “Whoever claims as his father other than his father knowingly, then Paradise is forbidden him.” [Sunan Abî Dâwûd (5113)]
As for the mere customary use of a name on official paperwork, this is not really that important, especially if changing your name all over again will cause you administrative difficulties or emotional pain.
And Allah knows best.
Fatwâ Department Research Committee of IslamToday Chaired by Sheikh `Abd al-Wahhâb al-Turayrî