Praise be to Allah.
Li’aan is prescribed for two reasons:
1 – If the husband accuses his wife of zina and cannot produce four witnesses, then he may get the hadd punishment for slander waived by engaging in li’aan.
2 – If he wants to deny that a child is his.
The basic principle concerning that is the passage in which Allaah says (interpretation of the meaning):
“And for those who accuse their wives, but have no witnesses except themselves, let the testimony of one of them be four testimonies (i.e. testifies four times) by Allaah that he is one of those who speak the truth.
7. And the fifth (testimony should be) the invoking of the Curse of Allaah on him if he be of those who tell a lie (against her).
8. But it shall avert the punishment (of stoning to death) from her, if she bears witness four times by Allaah, that he (her husband) is telling a lie.
9. And the fifth (testimony) should be that the Wrath of Allaah be upon her if he (her husband) speaks the truth”
Ibn Katheer (may Allaah have mercy on him) said in his Tafseer:
This verse offers a way out to husbands if a husband accuses his wife of zina but it is too difficult for him to establish proof; he may engage in li’aan against her as enjoined by Allaah, may He be glorified and exalted. This means bringing her before the judge and making his accusation against her, and the judge should make him swear four times by Allaah, instead of bringing four witnesses, that he is telling the truth i.e., about what he is accusing her of, namely zina. And the fifth time he should invoke the curse of Allaah upon himself if he is lying. If he says this, she becomes irrevocably divorced by virtue of this li’aan, according to al-Shaafa’i and many of the scholars, and she becomes permanently forbidden to him, and he should give her the mahr (dowry), and the hadd punishment for zina should be carried out on her. The punishment is not averted from her unless she also engages in li’aan and swears by Allaah four times that he is lying, i.e., with regard to what he has accused her of; and the fifth time she should invoke the wrath of Allaah upon herself if he is telling the truth. Hence Allaah says “But it shall avert the punishment (of stoning to death) from her, if she bears witness four times by Allaah, that he (her husband) is telling a lie.
9. And the fifth (testimony) should be that the Wrath of Allaah be upon her if he (her husband) speaks the truth.” End quote.
As for the wife, if she accuses her husband of zina, but she cannot produce four witnesses, then she should be given the hadd punishment for slander, because Allaah says (interpretation of the meaning):
“And those who accuse chaste women, and produce not four witnesses, flog them with eighty stripes, and reject their testimony forever. They indeed are the Faasiqoon (liars, rebellious, disobedient to Allaah)”
These verses apply equally to slander against both women and men.
Al-Qurtubi (may Allaah have mercy on him) said in his Tafseer: Allaah mentioned women in the verse because they are of greater concern and accusing them of immorality is more abhorrent and more hurtful, but slandering men is also included in the meaning of the verse, and the ummah is unanimously agreed on that. End quote.
Al-Maawardi said in Ahkaam al-Sultaaniyyah (p. 287): If a woman slanders her husband, she should be given the hadd punishment, but she should not engage in li’aan. End quote.
If a woman knows that her husband has committed zina but she has no proof, namely four witnesses, then she should advise him and remind him, and tell him to fear Allaah. If he persists in his sin she may ask for a divorce from him or separate from him by means of khula’, because there is nothing good for her in staying with him, and because his having intercourse with her may be harmful for her.
And Allaah knows best.