All perfect praise be to Allah, The Lord of the Worlds. I testify that there is none worthy of worship except Allah, and that Muhammad is His slave and Messenger.
There is a disagreement among the scholars as far as fasting on behalf of a dead person is concerned. But the majority of them agreed that if the dead person had a legal excuse to break the fast and did not get the opportunity to make up for the days he did not fast, because his illness continued until he died or because he did not get an appropriate time (like breaking up the fast in some days of Ramadan then he died on ‘Eed day) then nobody is obliged to fast on his behalf as he did not neglect fasting.
However, the scholars disagree about the person who neglected to make up for the days he broke the fast during Ramadan or that he made a vow to Allah to fast and he failed to do so. So, some scholars believe that his guardian must fast on his behalf and their evidence is the Hadeeth reported by Imams Al-Bukhari and Muslim that the Prophet said: “Whoever died while having some fasting due on him, then his guardian should fast on his behalf”.
However, some scholars are of the view that it is forbidden to fast on behalf of a dead person. But the most preponderant opinion is that it is not obligatory on the guardian to fast on his behalf but it is desirable for him to do so.
Allah knows best.