All perfect praise be to Allaah, The Lord of the Worlds. I testify that there is none worthy of worship except Allaah, and that Muhammad is His slave and Messenger.
We have already clarified in Fatwa 89082 that the child born out of wedlock is not traced back to the fornicator [or adulterer]; rather, he should be traced back to the mother. Therefore, you should not be traced back to that man who had an illegal relationship with your mother, and you should not be traced back to your grandfather or to any other specific man, but you should be traced back to your mother (i.e. carry her name).
In case you find it embarrassing to be traced back to your mother, then you may choose any general surname, like calling yourself daughter of ‘Abdullaah or daughter of ‘Abdur-Rahmaan because the term “‘Abd” in Arabic means a slave or servant and we are all slaves and servants of Allaah.
Allaah Knows best.