According to some scholars, a man’s divorce during his last illness is deemed invalid, for he might have intended to disinherit his wife by such a divorce. This kind of divorce is called by scholars “escapee’s divorce”, for such a husband “escapes” his wife’s right to inherit from him.
In this regard, the late Sheikh Hassanein Makhluf, former Mufti of Egypt, stated: The last illness is that during which pain keeps increasing till death. Juristically, it is agreed upon that the marriage must be well-established and in effect when one of the two spouses dies to entitle the other to inherit. That is to say, in order to be entitled to inherit from her deceased spouse, the wife must not be validly divorced or judgmentally divorced, such as being in her waiting period (`iddah) after a revocable divorce or an irrevocable divorce when the deceased has divorced her during his last illness without her request or consent. Accordingly, the deceased in the latter case is deemed an escapee for trying to disinherit his wife. Still, his death in this case, while she is in her waiting period after such a divorce, does not disinherit her; that is, she is still one of his legal heirs as a wife, and she is entitled to get half the eighth of the estate as a prescribed share, due to the existence of another wife of the deceased with legally-inheriting offspring.

In this connection, Ibn Taymiyah, the Sheikh of Islam, states in his book Majmu` Al-Fatawa:

This issue is related to the case of divorcing one’s wife after the consummation of marriage and during one’s last illness. According to the early and the late Muslim scholars, the ex-wife is entitled to inherit from the deceased in this case. That was the judgment of `Uthman ibn `Affan (may Allah be pleased with him) in the case of Tumadur bint Al-Asbagh, the ex-wife of `Abdur-Rahman ibn `Awf whom he had divorced during his last illness. This is also the opinion adopted by the juristic schools of Imam Malik, Imam Ahmad, Imam Abu Hanifah, and Imam Ash-Shafi`i.
There are some questions in such cases. For example, is such a divorced woman entitled to inherit from her deceased husband (who had divorced her during his last illness) if his death was after the passage of her waiting period? Another question is: What if such a divorce took place before the consummation of the marriage? In these two cases, there are two different juristic opinions; the most correct view is that the woman is still entitled to inherit from the deceased. This is the opinion of Imam Malik, the well-known opinion attributed to Imam Ahmad, and one of the opinions attributed to Imam Ash-Shafi`i. It is based on the narration that `Uthman judged in a similar case that the woman was entitled to get her prescribed share of the estate, though the divorce had taken place after the passage of her waiting period. This is because during his last illness, the man is regarded as legally incompetent under guardianship; thus, he cannot dispose of his wife’s share of the estate or that of any of his legal heirs. Moreover, he does not have the right to grant an extra share to any of his legal heirs, nor does he have the right to grant any non-inheriting person more than one-third of the estate, exactly as he does not have these rights after his death. Since the case of last illness is legally the same as that of death when it comes to inheritance, and since one cannot disinherit one’s wife after his death, one cannot disinherit her during one’s last illness. Divorce in this case is commonly known by scholars as “escapee’s divorce,” and this is the most correct view which I can give as a judgment.