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, sallallaahu ‘alayhi wa sallam, is His slave and Messenger.
The fostering of the daughter after she reaches the age of seven is the right of the father, so she is not given the right to choose between her parents like the son. There is a difference of opinion among the scholars on this issue; however, the view that we have stated here is the view that we consider to be the preponderant one; for more benefit, please refer to Fatwa 84618.
This ruling applies as long as the father does not have an impediment that makes him lose the right of fostering his daughter, like him becoming dissolute as clarified in Fatwa 90461.
Moreover, some jurists placed a condition that the husband should have a female who is suitable to foster his daughter in order to have the right of fostering her, as we clarified in Fatwa 131338.
In any case, the fostering of this daughter is the right of her father, and what you mentioned that this daughter is not happy with him because she used to live with you or that she is emotionally attached to you, then this does not make him lose the right of fostering if he deserves it. This is because he is hoped to protect and safeguard her, especially since you also mention that your current husband is negligent of his religion and regarding two major pillars of Islam which are the prayer and Zakat. If this is the case, then how can he be trusted to take care of the daughter, let alone the fact that in principle he has the right to refuse that your daughter resides with him in the same house? Moreover, you do not have the right to ask for the right of fostering while you are married to another husband and while there is another fosterer who meets the conditions of fostering.
Finally, your husband should be reminded of Allaah and of the danger of abandoning the prayer and refusing to pay the Zakat. In this regard, you may make use of the texts that are mentioned in Fataawa 88016 and 145065.
Allaah Knows best.