Question:
I have observed that some young Muslims fast during Ramadan but do not perform Salah (prayer). Will the fast of a person who does not pray be accepted? I have heard some preachers telling such individuals not to fast, claiming that fasting is invalid for those who neglect Salah.
Answer:
If a person upon whom Salah is obligatory denies its obligation and deliberately abandons it, then there is a consensus among scholars that such a person is a disbeliever (Kafir).
Similarly, according to the correct opinion of scholars, a person who neglects Salah out of laziness or heedlessness is also considered a disbeliever. Once a person is deemed a disbeliever, all of his acts of worship, including fasting and other righteous deeds, become null and void. This is based on the statement of Allah Almighty:
وَلَوْ أَشْرَكُوا لَحَبِطَ عَنْهُمْ مَا كَانُوا يَعْمَلُونَ
[Surah Al-An’am 6:88]
"And if they had associated others with Allah, then whatever they did would have been nullified."
However, despite this ruling, such a person should not be discouraged from fasting. Observing the fast may increase his inclination toward righteousness and bring him closer to his faith, fostering a sense of God-consciousness (Taqwa) in his heart. There is hope that through fasting, he may turn to Allah in repentance and start offering Salah.
And Allah alone grants success.
— Permanent Committee for Islamic Research and Ifta (اللجنة الدائمة)