"Actions are (judged) by motives (niyyah), so each man will have what he intended. Thus, he whose migration (hijrah) was to Allah and His Messenger, his migration is to Allah and His Messenger; but he whose migration was for some worldly thing he might gain, or for a wife he might marry, his migration is to that for which he migrated."
[Al-Bukhari & Muslim]
This hadith is considered to be one of the greatest hadith in Islam. Al-Imam al-Shafie said: “This Hadith is one third of the knowledge of Islam; related to about 70 topics of Fiqh.”
Imam Ahmad said: Before you do anything, check your intention (niyyah) - ask yourself before performing an action: "Is it for the sake of Allah?"
We must always make sure that our actions are for the sake of Allah and we are performing an act solely for Allah's sake whereby no other witness except Allah is sought. By doing this we are also showing ikhlas (sincerity) towards Allah. We can work towards achieving this by doing righteous deeds (the more good deeds we do for the sake of Allah, the closer we get to Him and the more sincere we become) & by seeking knowledge (our actions and deeds should be guided by knowledge so we do them in accordance of the Shariah).
The four things that contradict ikhlas are:
- Ma'siat - committing sins - this will weaken our ikhlas
- Shirk - associating others with Allah
- Riya' - performing an ibadah with the intention of showing off to others
- Nifaq - hypocrisy
It is a terrible possibility that all of our good deeds might not be of any value because of a corruption of our motives. To avoid that fate, one must know the dangers of changing his intentions and seeking the pleasure of others besides Allah. We may begin a good deed for the sake of Allah alone but due to other worldly rewards associated with the same act we may start enjoying them and even seeking them without any realization that a switch has taken place internally. They are hard to detect and even harder to repel. We may be under the illusion that we are performing a certain act for the sake of Allah but we might actually be in it for praise from the people around us.
Al-Imam al-Harawi said the root cause for insincerity (or shirk) is self-desire (al-hawa). He states that there are 7 types of self-desires:-
- To make oneself appear good in the hearts of others
- To seek the praises of others
- To avoid being blamed by others
- To seek the glorification of others
- To seek the wealth/money of others
- To seek the services or love of others
- To seek the help of others for oneself
Therefore no action should be done because of self-desire. Ibnu al-Qayyim says: Any action we do is subject to three defects:
- Being conscious that others are observing our actions
- Seeking a return (benefit/reward) for the action
- Being satisfied with the action
By being vigilant & conscious of our intentions we can work towards getting closer to Allah and seeking His pleasure. Once we achieve this it won’t matter whether you have gained acceptance and praise from the people around you but you can be sure that insha'Allah your deeds have been accepted by Allah and you will be rightly rewarded.
What happens if we were to change our niyyah while performing an action?
Ibn Rajab says according to the ulama' if the niyyah at the end of the action matches the beginning (i.e. doing the action for the sake of Allah), then any changes in the middle of the action will be forgiven or does not matter, insha Allah. However, if the niyyah at the end does not match the beginning, i.e. we do the action for other than the sake of Allah, then we must repent (taubah).