Praise be to Allah.
How does divorce take place?
So long as the husband has not uttered the word of divorce to her, and the wife has not gone to the judge to seek a divorce, then divorce has not taken place. She is still his wife and divorce does not take place automatically.
Shaykh Ibn Baz (may Allah have mercy on him) was asked when a woman is considered to be divorced. He said:
“A woman is considered to be divorced when her husband pronounces the word of divorce to her, when he is of sound mind and under no compulsion to do so, and there is no impediment to divorce such as his being insane or intoxicated, etc., and the woman is pure (not menstruating or bleeding following childbirth) and he has not had intercourse with her since she became pure, or she is pregnant or post-menopausal.” (Fatawa al-Talaq by Shaykh Ibn Baz, 1/35)
Necessity of treating wives equally
It is haram for this husband to do this and leave his first wife, and not treat her fairly or justly . By doing this he is exposing himself to the stern warning.
Abu Hurayrah said: “The Messenger of Allah (peace and blessings of Allah be upon him) said: “Whoever has two wives and inclines more to one of them than the other, will come on the Day of Resurrection with half of his body leaning.” (Narrated by Ibn Majah, 1959; classed as sahih by al-Albani in Sahih Sunan Ibn Majah, no. 1603)
If the first wife is being harmed by this, she has the right to refer the matter to the judge , so that he can force the husband either to divorce her or to annul the marriage. Because the scholars considered not having intercourse with one’s wife with the intention of harming her, even if he has not sworn an oath to that effect, to come under the same ruling as one who takes an oath not to have sexual relations with his wife (cf. al-Baqarah 2:226).
In this case, if he does not go back to his wife and refuses to divorce her, then the judge may make him divorce or annul the marriage. (See al-Mulakhkhas al-Fiqhi by al-Fawzan, 2/321)
And Allah knows best.