
We know that when a person who dies did not make Salaat, no one should pray on his behalf, nor should anyone fast on behalf of a person who could not observe fast. But if an able person dies before he completes Ramadan, no one needs fast on his behalf, according to the majority of the scholars, but his next of kin should expiate on his behalf by feeding one person for each day that was missed.
According to others, if the person dies before completing the missed days or before he makes up his oath (nadhir) the fast becomes mandatory and his or her next of kin most fast to make and expiate on his behalf. They cited a hadith reported by many, including Ahmed, Bukhari, and Muslim in which the Messenger of Allah, said as reported by his wife, 'Aishah (raa): "He who dies while there is upon him the obligation of fast, his next of kin ("Wali"), fast on his behalf."
No fasting is mandatory for the deceased's family if he dies in the middle of Ramadan.
In another report by Ibn Abbas (raa), he said: "A man came to the Messenger of Allah and asked him, `Oh Messenger of Allah, my mother passed away and upon her is the obligation of fast, should I make it up?' The Prophet (saas) responded: `If your mother was indebted, would you pay back her debt?' He said, `Yes.' The Prophet (saas), then said, the debt of Allah is worthy of paying.' These authenticated citations are evidence that redeeming the fast, interrupted by death, became mandatory for the relatives of the deceased.
The second group of scholars stated that whatever is obligated by the origin of the Sharī’ah such as the fasts of Ramadan is not to be fasted by one person on behalf of another. Deputing this act to another is not permitted. However, if the deceased left behind wealth, it can be used to feed a person for each day he had to make up. If he had no wealth, then if one of his close relatives wishes to feed a poor person each day, then that is a good deed. And this was the opinion of Shaikh Al-Islām Ibn Taymiyyah (rahimahullāh) and Al-Imām Ibn Al-Qayyim (rahimahullāh).