Praise be to Allah.
It should be noted that the basic principle is that each spouse has the right to have children, so the husband does not have the right to engage in coitus interruptus (‘azl) without his wife’s permission, and the wife does not have the right to use any means of contraception without his permission. See: al-Mawsoo‘ah al-Fiqhiyyah, 3/156.
Ibn Nujaym al-Hanafi said:
The woman’s blocking her womb, as women do to prevent having children, is haram without the permission of the husband, by analogy with the ruling on his engaging in coitus interruptus (‘azl) without her permission.
End quote from al-Bahr al-Raiq, 3/215.
Al-Bahooti al-Hanbali said:
Al-Qadi said: It is not permissible except with the permission of the husband, because he has the right to have children.
End quote from Kashshaf al-Qina‘, 2/96.
But if there is an obvious reason for the wife not to have children, such as if becoming pregnant will obviously cause her harm according to the testimony of trustworthy doctors, then in this case the husband’s right for her to ask his permission is waived, because the interest of preserving the woman’s health takes precedence over the interest of the husband having children.
The Prophet (blessings and peace of Allah be upon him) said: “There should be neither harming nor reciprocating harm.” Narrated by Ibn Majah, 2340; classed as hasan by al-Nawawi in al-Adhkar, p. 502
In fact the scholars stated that it is permissible for a pregnant woman to abort the pregnancy so long as it is in the early stages, if continuing the pregnancy will result in harm to her health. Please see the answer to question no. 82851.
In the Fatawa of ash-Shaykh Ibn Baz (may Allah have mercy on him) it says: I am a married woman and my husband refuses to let me take birth control pills because he does not understand the exhaustion that I feel and the harm that pregnancy could cause me. I took birth control pills without my husband’s knowledge; is there anything wrong with that?
The Shaykh replied: If you can avoid doing that, that will be more on the safe side. But if the harm and hardship is severe, there is nothing wrong with it; otherwise not taking pills is more on the safe side. Obedience to the husband is obligatory unless the harm would be great and too difficult for you, because Allah, may He be glorified, says (interpretation of the meaning):
“So keep your duty to Allah and fear Him as much as you can”
End quote from Majmoo‘ Fatawa Ibn Baz, 21/183
It is better for you to try to work the matter out with your husband and reach an agreement between yourselves; the man has to pay attention to his wife’s situation and state of health.
Ash-Shaykh Ibn ‘Uthaymeen (may Allah have mercy on him) said: If the husband sees that his wife will be affected by becoming pregnant, then he should give her permission to use contraception or he himself should use contraception, out of kindness to her, until she becomes strong enough for that.
End quote from Fatawa Noor ‘ala al-Darb.
With regard to the bad treatment on the husband’s part and his harsh attitude, that is not an excuse not to have children, because Allah may make this child a compensation and put a great deal of good in him, as He says (interpretation of the meaning) “And who brings out the living from the dead and brings out the dead from the living” [Yoonus 10:31].
And Allah says (interpretation of the meaning):
“If you dislike them, it may be that you dislike a thing and Allâh brings through it a great deal of good”
And Allah knows best.