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.
If this girl was born from an illegitimate relationship, as you mentioned, meaning that she cannot be Islamically traced back to your husband, then in this case she is not attributed to him (does not carry his name); rather, she is attributed to her mother, as we have already highlighted in fatwas 125132 and 194075.
It should be noted that declaring that she is not his daughter – if he claims that she is his daughter or if her mother claims that she is his daughter based on a marriage contract between them – is not an easy matter, and it is the Muslim judge or whoever can act on his behalf who may decide on the case.
If the Muslim judge decides that she is his legitimate daughter, then she has the right of a girl on her father, such as nurturing her, spending on her, and so forth, on him.
Hence, you should know that this girl may be traced back to her father from fornication or adultery, and she may have a right on him like his legitimate son.
In case she is his (legitimate) daughter, then the scholars of Fiqh stated that the wife has the right to refuse that her husband's child from another woman lives with her, and some scholars made exceptions for some special cases: for example, if the wife knew about this when the husband consummated the marriage with her, or if she did not know about it but the child does not have anyone else to take custody of him; in which case, she does not have the right to refuse.
Finally, we recommend that the two of you try to reach a mutual understanding and to endeavor to avoid divorce as much as possible, especially given that you have a child. If divorce takes place, the child may be harmed by the separation of the parents. If there is a dispute, then it is more appropriate to take the case to an Islamic Center.
Allah knows best.