In this scenario, first option would be to secure an anticipatory bail from the sessions court after making complaint to the police about the issue mentioned.
For custody of the child, if a child is under 5 years, the courts usually prefer to hand over custody to the mother, the primary question in focus for the court is keeping the child's welfare in mind; albeit in several Supreme Court judgments, there is no distinction as to whom the court should prefer in handing over the custody.
You would have to get in touch with a lawyer for the anticipatory bail.
thanks.