Praise be to Allah
Zina is a crime on its own, in terms of its sin and consequences. None of its sin can be waived unless you repent sincerely to Allah, may He be glorified and exalted, as He says (interpretation of the meaning):
“And those who invoke not any other ilaah (god) along with Allah, nor kill such person as Allah has forbidden, except for just cause, nor commit illegal sexual intercourse __ and whoever does this shall receive the punishment.
69. The torment will be doubled to him on the Day of Resurrection, and he will abide therein in disgrace;
70. Except those who repent and believe (in Islamic Monotheism), and do righteous deeds; for those, Allah will change their sins into good deeds, and Allah is Oft‑Forgiving, Most Merciful
71. And whosoever repents and does righteous good deeds; then verily, he repents towards Allah with true repentance”
Although marriage may offer concealment for what occurred between you of immoral and indecent actions, it is not a prescribed remedy for the sin and shame of zina. The remedy for that is sincere repentance and mending one’s ways as much as possible in the future, and doing a lot of good deeds, in the hope that Allah may bless you by accepting your repentance and good deeds.
In that case, we say to you:
If what you mean when you say that this girl is not religious is that she is promiscuous and morally corrupt, and that she does not respect the religion of Allah or protect herself (from shameful deeds) and is not chaste, then forget about this girl and her ways; focus on yourself, repent properly to your Lord, adhere to His commands, do as many good deeds as you can, and keep yourself chaste by marrying a woman who is good and righteous.
But if this girl has repented from what happened between you, and it was the Shaytaan who tempted her to do that, as he tempted you, because she was infatuated with you, or because of a mistake on her part, and it seems to you from her attitude that she regrets having disobeyed her Lord, and the worst that can be said is that she is careless with regard to hijab, or with regard to some matters, then there is nothing wrong with you marrying her, after you and she have repented. In fact we encourage you to do that, because you and she have in common the crime of zina, and perhaps it was you who tempted her or promised her marriage, or you led her on, until you fell into that sin. In that case it is neither fair nor decent to leave her to bear alone the shame and consequences of what you did together, and let her carry that burden on her own, whilst you carry on with your life as if you never did anything!
Undoubtedly your marrying her would come under the heading of complete concealment that Allah loves for His slaves, and striving to relieve the distress of one who is distressed, so long as he has repented from his sin.
If you think that your family will object, then try to convince them that marriage to relatives is not all bad, and make her show them that which will endear her to your family. Encourage her to repent sincerely and to show the effects of her repentance in her outward appearance and her conduct.
If it is not possible for you to marry her, and your families object to such a marriage, and you think that this marriage may be a cause of severing ties of kinship or disobedience towards parents, then in that case there is no blame on you if you end your relationship with her and focus on your own affairs, and leave her to her own affairs, after making a concerted and sincere effort to conceal her sin, keep her chaste and protect her. And Allah will take care of her affairs, rectify her condition, enable her to repent sincerely and bless her with a husband who will keep her chaste.
And Allah knows best.