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.
In principle, when husband and wife separate, the custody of the children goes to the mother, unless she remarries a man who is not a Mahram or a paternal relative to her children (i.e. not like their paternal uncle or their father's paternal cousin) or there is a legal impediment that prevents her from taking custody of them. For more benefit, kindly refer to Fatwa 198609.
Therefore, if you separate from your husband, the custody of your young children goes to you as long as you are eligible for custody and do not move to another country. There is no sin on you in doing this. It should be noted that the parent who has custody of the children has no right to prevent the other parent from seeing or visiting them.
If there is any dispute over custody, an Islamic court should settle such disputes. Otherwise, an authority that may act on its behalf, like the Islamic Centers, when there are no Islamic courts.
Finally, we advise you not to hasten in asking for divorce as it is not a trivial matter and one should not resort to it unless all other means of reconciliation are impossible. If a husband and wife can reconcile and have good marital relations even it means tolerating some mistakes and renouncing some rights, it is better than divorce, especially when children are involved.
For more benefit, please refer to Fataawa 86307, 89607 and 173139.
Allaah Knows best.