Explanation of Hadith “Actions are but by intentions”

It is narrated on the authority of Amir al-Mu’minin (Leader of the Believers), Abu Hafs ‘Umar bin al-Khattab (may Allah be pleased with him), who said: I heard the Messenger of Allah (peace be upon him), say

“Actions are according to intentions, and everyone will get what was intended. Whoever migrates with an intention for Allah and His messenger, the migration will be for the sake of Allah and his Messenger. And whoever migrates for worldly gain or to marry a woman, then his migration will be for the sake of whatever he migrated for.”


Related by Bukhari & Muslim1

عَنْ أَمِيرِ الْمُؤْمِنِينَ أَبِي حَفْصٍ عُمَرَ بْنِ الْخَطَّابِ رَضِيَ اللهُ عَنْهُ قَالَ:

سَمِعْتُ رَسُولَ اللَّهِ صلى الله عليه وسلم يَقُولُ: ” إنَّمَا الْأَعْمَالُ بِالنِّيَّاتِ، وَإِنَّمَا لِكُلِّ امْرِئٍ مَا نَوَى، فَمَنْ كَانَتْ هِجْرَتُهُ إلَى اللَّهِ وَرَسُولِهِ فَهِجْرَتُهُ إلَى اللَّهِ وَرَسُولِهِ، وَمَنْ كَانَتْ هِجْرَتُهُ لِدُنْيَا يُصِيبُهَا أَوْ امْرَأَةٍ يَنْكِحُهَا فَهِجْرَتُهُ إلَى مَا هَاجَرَ إلَيْهِ

رَوَاهُ إِمَامَا الْمُحَدِّثِينَ أَبُو عَبْدِ اللهِ مُحَمَّدُ بنُ إِسْمَاعِيل بن إِبْرَاهِيم بن الْمُغِيرَة بن بَرْدِزبَه الْبُخَارِيُّ الْجُعْفِيُّ [رقم:1]، وَأَبُو الْحُسَيْنِ مُسْلِمٌ بنُ الْحَجَّاج بن مُسْلِم الْقُشَيْرِيُّ النَّيْسَابُورِيُّ [رقم:1907] رَضِيَ اللهُ عَنْهُمَا فِي “صَحِيحَيْهِمَا” اللذَينِ هُمَا أَصَحُّ الْكُتُبِ الْمُصَنَّفَةِ.

How did Umar (may Allah be pleased with him) get all these titles?

This hadith — “Indeed, actions are but by intentions, and every man shall have only what he intended” — is one of the foundational principles of Islam. Many scholars of the salaf said it should be placed at the beginning of every Islamic book. This is why Imam al-Bukhari began his Sahih with it. Imam Ahmad also remarked that Islam revolves around three hadiths: this one, the hadith of Aishah (RA) on rejecting innovations, and the hadith of Nu’man ibn Bashir (RA) about lawful, unlawful, and doubtful matters. Together, these ahadith cover the framework of Islamic practice: doing what is commanded, avoiding what is prohibited, and steering clear of the doubtful.

This hadith is needed in all aspects of the deen—whether performing acts of worship, avoiding sins, or navigating unclear matters—because intention is what gives value to the action. The Prophet ﷺ used the phrase “Innamal a’malu bin-niyyat”, which implies exclusiveness: actions are judged only by their intentions.

Scholars differ regarding the meaning of the first phrase:

First Opinion:

  • “Actions are but by intentions” means actions are accepted, sound, and valid only if the intention is correct (i.e., for Allah).
  • “And for every person is what he intended” refers to reward: one receives reward only in proportion to the sincerity of their intention.

Here, “bi” in “bin-niyyat” is interpreted as causality—acceptance is caused by intention. This opinion connects the hadith directly to rulings and reward in Islamic law.

Second Opinion:

  • This view sees intention as the cause of the action itself, not its acceptance. That is, every action begins from an intention, whether good or bad, accepted or rejected.
  • According to this view, every human act originates from an inner purpose or motive, even if the act is not religious.

The first opinion focuses on the validity and reward of the deed in Islamic terms, while the second emphasizes the role of intention as the source of all human action.

Shaykh al-Shanqiti and others held that both meanings are valid, and the hadith beautifully accommodates both: it shows that every act stems from intention, and only sincere intentions earn reward and acceptance from Allah.

Actions

‘Actions’ here means anything that emanates from the person. It does not just mean the physical acts of the limbs, but the word ‘actions’ also includes the speech of the heart, the actions of the heart, the speech of the tongue and the actions of the limbs. So included in this word ‘actions’ is everything to do with one’s Iman.

Intentions

The Role and Place of Intention (Niyyah) in Islam

The place of intention is the heart, not the tongue. In other words, when a person intends to do something, it is the heart that aims, decides, and resolves to perform that action. The sincerity and determination behind the action must come from within, not merely from words.

For an act to be accepted by Allah, it must be done with a sincere intention—one that seeks the pleasure of Allah alone. This is why the Qur’an and Sunnah use several words to express the concept of niyyah, such as:

  • Iraadah – desire, will
  • Ibtighaa’ – seeking or pursuing (e.g. the Face of Allah)
  • Qasd – aim or direction
  • Ikhlas – sincerity, purity of intention
  • Islam of the heart – submission and devotion to Allah internally

Niyyah

Two Levels of Niyyah in the Qur’an and Sunnah

There are two main meanings of niyyah found in Islamic sources:

1. Niyyah Toward the ‘Ibaadah (Act of Worship)

This is the intention that distinguishes one act of worship from another. This is the type the fuqahaa’ (jurists) focus on. For example:

  • When someone prays two rak‘ahs in the masjid at Fajr time—are they Sunnah, Tahiyyat al-Masjid, or the obligatory Fajr prayer?
  • When someone fasts outside Ramadan—is it a voluntary fast or a makeup fast?

This intention defines what the act is.

2. Niyyah Toward the Ma’bood (The One Being Worshipped)

This refers to who the act is being done for. Is it sincerely for Allah, or for showing off, gaining praise, or worldly benefit? This intention determines whether the act is accepted. It is closely linked with ikhlas (sincerity).

The Hadith Encompasses Both Types of Niyyah

The hadith “Indeed, actions are but by intentions, and every person will have only what they intended” includes both meanings:

  • The first part emphasizes that actions are only valid when the person intends the act correctly (i.e., what kind of act it is).
  • The second part clarifies that a person’s reward or outcome is based on who they did it for. (i.e., for Allah or for worldly gain)

“And for every man is that which he intends”

The hadith “Indeed, actions are only by intentions…” includes the concept of ḥaṣr (exclusiveness) due to the word “innamā”, indicating that the reward and acceptance of every action depends entirely on the intention behind it.

If a person performs an act seeking Allah and the Hereafter, the action is sound and accepted. But if the act is done for worldly purposes, even if outwardly religious, it becomes void and rejected.

As Allah Says in the Qur’an:

And they were not commanded except to worship Allah alone, [being] sincere to Him in religion,…”

Qur’an: Surah Bayyinah Ayat 5 (98:5)

Allah also said that is mentioned in a hadith qudsi:

عَنْ أَبِي هُرَيْرَةَ قَالَ قَالَ رَسُولُ اللَّهِ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ قَالَ اللَّهُ تَبَارَكَ وَتَعَالَى أَنَا أَغْنَى الشُّرَكَاءِ عَنْ الشِّرْكِ مَنْ عَمِلَ عَمَلًا أَشْرَكَ فِيهِ مَعِي غَيْرِي تَرَكْتُهُ وَشِرْكَهُ

Abu Huraira reported: The Messenger of Allah, peace and blessings be upon him, said, “Allah Almighty said: Verily, I am free of the idolatry of any partners. Whoever performs a deed in which he associates another with Me, I will abandon him to his partner.

Reported By Muslim2

Three Scenarios Where Sincerity is Compromised

1. The Action is Initiated for Other Than Allah

When the base intention behind an act of worship is to show off or gain human praise, the action is invalid and considered major shirk. An example: praying, fasting, or giving charity only to impress others. The Prophet ﷺ said:

عَنْ شَدَّادِ بْنِ أَوْسٍ قَالَ قَالَ رَسُولُ اللَّهِ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ مَنْ صَلَّى يُرَائِي فَقَدْ أَشْرَكَ وَمَنْ صَامَ يُرَائِي فَقَدْ أَشْرَكَ

“Whoever prays to be seen has associated partners with Allah. Whoever fasts to be seen has associated partners with Allah.”

Reported by Musnad al-Bazzār 2967 Grade: Hasan (fair) according to Ibn Kathir3

Such behavior, if consistent across one’s acts of worship, aligns with nifāq (hypocrisy), as Allah said:

“…… And when they stand for prayer, they stand lazily, showing [themselves to] the people and not remembering Allah except a little”

Surah An Nisa 4:142

2. The Intention Changes During the Action

Two cases exist here:

(a) If one begins an act sincerely for Allah, but later nullifies that sincerity and does it for others, the entire act becomes invalid.

(b) If one enhances the act to impress others—e.g., reciting more beautifully or lengthening dhikr unnaturally when noticed—then only that portion is void, and it becomes minor shirk (riyaa). but the foundation of the action is still considered accepted because this false intention was not made for other than Allah when the action was initiated.

3. Praise After the Action

He completes the action for the sake of Allah, but then after completing the action, he gets praised for his action and he gets happy about that and then desires the person to praise him more for that action. The ruling for this type of action is that it is not considered shirk, because it occurred after the action and in fact during the action he intended Allah alone.

As the prophet () said:

عَنْ أَبِي ذَرٍّ قَالَ قِيلَ لِرَسُولِ اللَّهِ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ أَرَأَيْتَ الرَّجُلَ يَعْمَلُ الْعَمَلَ مِنْ الْخَيْرِ وَيَحْمَدُهُ النَّاسُ عَلَيْهِ قَالَ تِلْكَ عَاجِلُ بُشْرَى الْمُؤْمِنِ

“They are early glad tidings for a believer.”

Related by Muslim4

Two Categories of Actions in Relation to Intention

Actions whose intentions should be for Allah are of two categories

1. Actions in which it is impermissible to have the intention for other than Allah

These are most of the acts of worship and are those acts which Allah has not mentioned a worldly reward for.

2. Actions which Allah and His messenger SAW have encouraged by mentioning a portion of the reward for them as being something in this dunya

Some actions are encouraged in Islam with both religious and worldly rewards mentioned. An example of this is when the Messenger of Allah ﷺ said:

عن أنس بن مالك رضي الله عنه أن رسول الله صلى الله عليه وسلم قال:مَنْ أَحَبَّ أَنْ يُبْسَطَ لَهُ فِي رِزْقِهِ، وَيُنْسَأَ لَهُ فِي أَثَرِهِ، فَلْيَصِلْ رَحِمَهُ

“Whoever wants his provision to be increased and his life to be extended, let him uphold ties of kinship.”

(Reported by al-Bukhārī and Muslim)5

So whoever intends by these types of actions that which Allah and His messenger have mentioned from the rewards of these actions, then it is allowed for him to intend and desire that, because they did not encourage these actions by mentioning their respective worldly rewards except as a permission from them for people to desire these rewards and perform these actions seeking these rewards.

However, the one who seeks only Allah’s pleasure holds a higher rank.

“So whoever migrates for Allah and His Messenger, then his migration is for Allah and His Messenger. And whoever migrates for a worldly gain or to marry a woman, then his migration is for whatever he migrated for,”

The second part of the hadith, serves as a practical example to explain the principle mentioned in the first part: “Actions are only by intentions, and each person will have what he intended.”

The Meaning of Hijrah

The word hijrah (migration) at its core means to leave or to abandon. It has two levels:

1. General Hijrah

This refers to spiritual migration—leaving behind sin and moving towards Allah through sincerity in worship, and towards the Messenger ﷺ by following his Sunnah. It means living a life guided by obedience and devotion.

2. Specific Hijrah

This refers to physically migrating from a land of disbelief (shirk) to a land of Islam, where a person can practice their faith freely.

Sincere Hijrah

The hadith tells us that whoever migrates with the intention of pleasing Allah and following His Messenger ﷺ, then their migration is considered purely for Allah and His Messenger. The actual reward is left unmentioned—this is a rhetorical technique to emphasize the greatness of the reward. It’s as if to say: the reward is so immense, it doesn’t even need to be described.

Hijrah for Other Purposes

The Prophet ﷺ then contrasts this with people who migrate for worldly goals, such as:

  • A businessman who migrates seeking wealth or a better life.
  • A man migrating to marry a woman, possibly because she required him to move before agreeing to marriage.

In these cases, the person will only receive what they intended. Their act of migration may look similar to others on the outside, but its spiritual value depends entirely on the intention behind it. If the intention is worldly, then the reward is limited to that worldly goal, with no share of reward from Allah in the Hereafter.

“then his migration is for whatever he migrated for”

This means that if a person migrates with a worldly intention, such as business or marriage, then his reward will be limited to that worldly goal. He will not receive any reward for hijrah as an act of worship.

What Is Hijrah in the Shar’i Sense?

Scholars define hijrah (migration) in the context of Islam as:

  1. Leaving a land of shirk (disbelief) to migrate to a land of Islam, where one can openly practice their religion.
  2. Migrating from a land of widespread bid‘ah (innovation) to a place where the Sunnah is preserved and followed.
  3. Leaving a land of fisq (sin, corruption, or open immorality) to move to a land where Islamic values are upheld.

Each of these types of migration carries different legal rulings and religious consequences, which are detailed in the classical books of fiqh.

In Conclusion

So, when the Prophet ﷺ said, “his migration is for whatever he migrated for,” it is a reminder that the value of the deed lies entirely in the intention behind it. Even noble actions like hijrah lose their reward if not done sincerely for the sake of Allah and His Messenger ﷺ.

References

  1. Sahih al-Bukhari (1), Sahih Muslim (1907) ↩︎
  2. Sahih Muslim(2985) ↩︎
  3. Musnad al-Bazzār (2967) Hasan (fair) according to Ibn Kathir ↩︎
  4. Sahih Muslim (2642) ↩︎
  5. Sahih al-Bukhari (2067) and Sahih Muslim (2557) ↩︎


Discover more from Debunking Misguidance

Subscribe to get the latest posts sent to your email.

Leave a Reply

Your email address will not be published. Required fields are marked *

Discover more from Debunking Misguidance

Subscribe now to keep reading and get access to the full archive.

Continue reading