Praise be to Allah.
Both spouses should be keen to fulfil rights and duties, treat one another kindly, be gracious to one another, and strive to solve any problems they may face, in an atmosphere of love and mutual understanding, acting in accordance with the words of Allah (interpretation of the meaning):
“And live with them honourably”
“And they (women) have rights (over their husbands as regards living expenses, etc.) similar (to those of their husbands) over them (as regards obedience and respect, etc.) to what is reasonable, but men have a degree (of responsibility) over them. And Allah is All-Mighty, All-Wise”
It is not permissible for the husband to forsake his wife in bed for this length of time, unless she is defiantly disobedient towards him and does not fulfil his rights that it is obligatory for her to fulfil. In that case it is permissible for him to forsake her until she repents, because Allah, may He be exalted, says (interpretation of the meaning):
“As to those women on whose part you see ill conduct, admonish them (first), (next), refuse to share their beds, (and last) beat them (lightly, if it is useful), but if they return to obedience, seek not against them means (of annoyance). Surely, Allah is Ever Most High, Most Great”
But if there is no defiant disobedience or ill conduct, it is not permissible to shun them or refuse to share their beds in this manner, for two reasons:
1.It is obligatory for the husband to keep his wife chaste and to have sex with her according to her needs and his ability.
Shaykh al-Islam Ibn Taymiyah (may Allah have mercy on him) was asked about a man who is able to stay away from his wife for one or two months, and does not have intercourse with her: is there any sin on him or not? Is the husband required to do that?
It is obligatory for the man to have intercourse with his wife on a reasonable basis, and this is one of the most important rights that she has over him; it is more important than feeding her. With regard to obligatory intercourse, according to one view, it is obligatory (at least) once every four months; according to another view, it should be according to her need and his ability, just as he should feed her according to her need and his ability. The latter is the more correct of the two opinions.
End quote from Majmoo‘ al-Fataawa (32/271).
2.The one who refuses to have intercourse with his wife – if she is not defiantly disobedient – for four months comes under the same ruling as one who swore an oath (called eela’) not to have sexual relations with his wife (see al-Baqarah 2:226); he should be instructed (by the qaadi or judge) either to have intercourse with her or to divorce her, and if he refuses to divorce her, then the qaadi may issue a ruling of divorce.
The scholars of the Standing Committee said: If a man shuns his wife for more than three months, if that is because of defiant disobedience on her part, i.e., the wife is disobeying her husband with regard to marital rights that are obligatory upon her, and she has persisted in that after he has admonished her and reminded her to fear Allah, may He be exalted, and he has reminded her of her obligatory duties towards her husband, then he may forsake her in bed for as long as he wants, so as to discipline her until she willingly fulfils her husband’s rights. But with regard to the husband forsaking his wife in bed for more than four months, so as to cause her harm without any shortcoming on her part with regard to her husband’s rights, then in this case he is like one who swore an oath (called eela’) not to have sexual relations with his wife (see al-Baqarah 2:226), even if he did not actually swear an oath to that effect. He is to be given a deadline equal to the time of eela’ (which is four months), then when four months have passed, if he does not come back to his wife and have intercourse with her in the vagina, when he is able to do so, if she is not menstruating or bleeding following childbirth, then he is to be ordered to issue a divorce. If he refuses to go back to his wife and he refuses to issue a divorce, then the qaadi may issue a ruling of divorce or annul the marriage, if the wife requests that.
End quote from Fataawa al-Lajnah ad-Daa’imah no. 20443.
Our advice to you is to think about the reason why he has kept away from you. Perhaps you have fallen short in adorning yourself for him, or perhaps he is suffering from some sickness or problem that needs someone to help him to treat it.
Sit down with him and have a calm discussion, without apportioning blame, about the causes of this problem. If that does not help, then bring in a wise and rational person from your family or his, who can help solve the problem. If none of these approaches work, then in that case there is nothing wrong with taking the matter to the qaadi and requesting a divorce so as to ward off the harm that is affecting you.
If you choose to be patient in the hope that Allah, may He be exalted, will guide your husband and put an end to his mistreatment, then there is nothing wrong with doing that, in sha Allah, on condition that that will not cause you hardship or expose you to temptation because of his shunning you.
We ask Allah to bring you together in a good way.
And Allah knows best.