Answered by Shaykh Yusuf Weltch
If a person does a good deed solely for worldly benefits is s/he a disbeliever and are all their deeds void?
In the Name of Allah, the Most Merciful and Compassionate
In order to answer your question it is necessary to first lay down a framework. Imam al-Ghazali (Allah be pleased with him) mentions in the Book of Intentions, Sincerity and Truthfulness of his magnum opus Ihya ‘Ulum al-Din (Revival of the Religious Sciences) the following (paraphrased):
Deeds or actions are of three types: Acts of worship (ta’at), Acts of disobedience (m’asiyya), and merely permitted acts (mubahat).
Acts of Worship for Worldly Benefits
As for the first type, acts of worship are only accepted if the impetus for performing them is the for sake of Allah Most High. [Ghazali, Ihya ‘Ulum al-Din]
If other ulterior motives – that are not related to that original intention of drawing near to Allah Most High – creep into one’s intentions the reward is decreased. [Ibid.]
If one does this category of action solely or mostly for the sake of worldly gain, it will not be accepted from them and they will be sinful for their insincerity. [Ibid.] End Qoute.
Note that such an act although sinful is not disbelief and does not take one out of Islam.
An example of this is a person who performs the act of fasting solely for the sake of health benefits; or someone who recites Sura Waqi’a solely for financial gains – with no intention of drawing to Allah Most High.
The verse you quoted would indeed apply to this category as well as the actions of those who disbelieve in Allah Most High as they are necessarily for other than Allah Most High.
Merely Permitted Acts
As for those acts that are merely permitted – meaning the Sacred law neither commands their performance nor prohibits it – if they are performed for worldly intentions, it is not sinful whatsoever. [Ibid.]
However, it is indeed a lost opportunity for the Muslim. This is because these permitted acts can become acts of worship by making intentions to worship Allah Most High through them. [Ibid.]
For example, if someone exercises solely to lose weight, they are not sinful nor do they get rewarded for such an act. However, if they intended to work out to keep themselves healthy to worship Allah Most High better and longer it is now an act of worship as it connects to Allah Most High.
The deeds that are of no avail to the one who performed them are those deeds that are done for other than Allah’s sake. [Ibid.]
This would include all the deeds of those who reject Islam and/or worship other than Allah Most High
This also applies to deeds that are done entirely for worldly benefits as well as those deeds that are done mostly for worldly benefits and the pleasure of Allah Most High is just a secondary intention. [Ibid.]
Hope this helps
Allah knows best
[Shaykh] Yusuf Weltch
Checked and approved by Shaykh Faraz Rabbani
Shaykh Yusuf Weltch is a teacher of Arabic, Islamic law, and spirituality. After accepting Islam in 2008, he then completed four years at the Darul Uloom seminary in New York where he studied Arabic and the traditional sciences. He then traveled to Tarim, Yemen, where he stayed for three years studying in Dar Al-Mustafa under some of the greatest scholars of our time, including Habib Umar Bin Hafiz, Habib Kadhim al-Saqqaf, and Shaykh Umar al-Khatib. In Tarim, Shaykh Yusuf completed the memorization of the Qur’an and studied beliefs, legal methodology, hadith methodology, Qur’anic exegesis, Islamic history, and a number of texts on spirituality. He joined the SeekersGuidance faculty in the summer of 2019.