If the problems to which you refer have to do with some defect in your husband that discourages intimacy between you, or prevents achievement of the purposes of marriage such as mercy and love, because he is not able to have intercourse or he suffers from a sickness which prevents him from being intimate, then the scholars count these things as faults in the marriage which entitle the wife to have the choice: in other words, you have the right to annul the marriage contract or to leave it as is, and he does not have the right to take any part of the mahr from you, because you gained the right to the mahr in return for the intimacy that he has had with you in past years.
With regard to the man’s sterility, i.e., his inability to father children, this is not counted as a fault that would necessitate annulment of the marriage, according to the majority of scholars, apart from the view of al-Hasan al-Basri, and Shaykh al-Islam Ibn Taymiyah was also inclined towards that view.
The husband should have explained his situation to his wife, because the wife has the right to have children just as the husband does. For this reason a husband is not permitted to practise ‘azl (coitus interruptus) – which means ejaculating outside the vagina – without his wife’s consent.
Ibn Qudaamah said, after listing the faults which give the wife the option of annulling the marriage contract,
We do not know of any differing opinion among the scholars concerning this matter, except that al-Hasan said: If one finds that the other is sterile, there is the option of annulling the marriage.
Ahmad preferred that (the husband) should state his situation and said: Perhaps his wife wants to have a child, and this should be clarified at the beginning of the marriage. As for annulment, there is no proof of that (in sharee’ah), otherwise it would apply in the case of women when they reach menopause, and such a ruling is not known. For a man may not have a child when he is young, then he may have a child when he is an old man, or they may not have children at all.
With regard to other faults, according to the scholars it is not proven that they are grounds for annulment.
On this basis, if you do not want to put up with him, then either he should divorce you by talaaq according to sharee’ah, or you may free yourself from him by khula’, whereby you agree to give him a certain amount of money, or you return the mahr to him or whatever you agree upon, whatever will be a suitable recompense in return for khula’, then he should divorce you with a single talaaq. This talaaq will count as a revocable divorce, and he will not have the right to take you back during the ‘iddah or afterwards unless there is a new marriage contract that meets the appropriate conditions.
The evidence that khula’ is permissible is the aayah (interpretation of the meaning):
“The divorce is twice, after that, either you retain her on reasonable terms or release her with kindness. And it is not lawful for you (men) to take back (from your wives) any of your Mahr (bridal-money given by the husband to his wife at the time of marriage) which you have given them, except when both parties fear that they would be unable to keep the limits ordained by Allaah (e.g. to deal with each other on a fair basis). Then if you fear that they would not be able to keep the limits ordained by Allaah, then there is no sin on either of them if she gives back (the Mahr or a part of it) for her Al-Khul‘ (divorce). These are the limits ordained by Allaah, so do not transgress them. And whoever transgresses the limits ordained by Allaah, then such are the Zaalimoon (wrongdoers)” [al-Baqarah 2:229]
The evidence from the Sunnah is the hadeeth narrated by al-Bukhaari in his Saheeh (4867) from Ibn ‘Abbaas, in which it says that the wife of Thaabit ibn Qays came to the Messenger of Allaah (peace and blessings of Allaah be upon him) and said, “O Messenger of Allaah, I do not blame Thaabit ibn Qays for any defect in his character or his religious commitment, but I would hate to commit an act of kufr when I am a Muslim.” The Messenger of Allaah (peace and blessings of Allaah be upon him) said, “Will you give him back his garden [which he had given as mahr]?” She said, “Yes.” The Messenger of Allaah (peace and blessings of Allaah be upon him) said (to Thaabit), “Accept the garden, and divorce her once.”
The scholars are agreed that khula’ is permissible if there is a shar’i reason for it. For more information on the reasons, please see question no. 1859.
We must advise you that if your husband’s character and religious commitment are good, and there is no risk of you falling into haraam things if you remain married to him, then it is better for you to be patient and stay with your husband; perhaps Allaah will grant you from him sons and daughters who will be the apple of your eye.
And Allaah knows best what is right.
See al-Mughni by Ibn Qudaamah, 7/246; al-Mawsoo’ah al-Fiqhiyyah, 19/238, 240.