حَدَّثَنَا عَبْدُ اللَّهِ بْنُ مَسْلَمَةَ بْنِ قَعْنَبٍ، حَدَّثَنَا مَالِكٌ، عَنْ يَحْيَى بْنِ سَعِيدٍ، عَنْ مُحَمَّدِ، بْنِ إِبْرَاهِيمَ عَنْ عَلْقَمَةَ بْنِ وَقَّاصٍ، عَنْ عُمَرَ بْنِ الْخَطَّابِ، قَالَ قَالَ رَسُولُ اللَّهِ صلى الله عليه وسلم ‏"‏ إِنَّمَا الأَعْمَالُ بِالنِّيَّةِ وَإِنَّمَا لاِمْرِئٍ مَا نَوَى فَمَنْ كَانَتْ هِجْرَتُهُ إِلَى اللَّهِ وَرَسُولِهِ فَهِجْرَتُهُ إِلَى اللَّهِ وَرَسُولِهِ وَمَنْ كَانَتْ هِجْرَتُهُ لِدُنْيَا يُصِيبُهَا أَوِ امْرَأَةٍ يَتَزَوَّجُهَا فَهِجْرَتُهُ إِلَى مَا هَاجَرَ إِلَيْهِ ‏"‏ ‏.‏
Translation
It has been narrated on the authority of Umar b. al-Khattab that the Messenger of Allah (ﷺ) said

(The value of) an action depends on the intention behind it. A man will be rewarded only for what he intended. The emigration of one who emigrates for the sake of Allah and His Messenger (ﷺ) is for the sake of Allah and His Messenger (ﷺ) ; and the emigration of one who emigrates for gaining a worldly advantage or for marrying a woman is for what he has emigrated.

Comment

The Book on Government - Sahih Muslim 1907a

This hadith, known as the "Hadith of Intentions," establishes the fundamental Islamic principle that the spiritual value of all deeds is determined by the intention (niyyah) behind them. It serves as the cornerstone of Islamic jurisprudence and spirituality.

The Primacy of Intention

The Prophet (ﷺ) begins by establishing the universal principle: "The value of an action depends on the intention behind it." This means that outward actions, while important, derive their spiritual weight from the inward state of the heart. A seemingly minor deed with sincere intention may be greater than a major deed performed for show.

Scholars explain that intention serves three primary purposes: it distinguishes acts of worship from mere habits, distinguishes different categories of worship from one another, and determines the spiritual reward or lack thereof.

Divine Recompense According to Intention

"A man will be rewarded only for what he intended" clarifies that Allah's judgment is based on what the servant truly intended in their heart, not merely the outward appearance of the action. This protects against hypocrisy and emphasizes that Allah knows the innermost secrets of hearts.

The scholars note that this principle applies to both worship and worldly transactions. A person will receive reward for what they intended to do, even if unable to complete the action, provided the intention was sincere.

The Emigration Example

The Prophet (ﷺ) provides the practical example of emigration (hijrah) to illustrate his point. The physical act of moving from one place to another is identical, but the spiritual consequences differ radically based on intention.

"The emigration of one who emigrates for the sake of Allah and His Messenger (ﷺ) is for the sake of Allah and His Messenger" refers to those who left Mecca for Medina purely for the sake of preserving their faith and supporting the Muslim community. Their reward is complete and eternal.

"The emigration of one who emigrates for gaining a worldly advantage or for marrying a woman is for what he has emigrated" refers to those who performed the same physical action but for worldly motives. They receive only what they sought - worldly benefit - but no spiritual reward.

Scholarly Commentary

Imam Nawawi comments that this hadith is one of the fundamental principles of Islam, encompassing both outward and inward aspects of religion. It teaches that sincerity (ikhlas) is the soul of all worship.

Ibn Rajab al-Hanbali explains that this hadith distinguishes between those whose actions are purely for Allah and those who mix their intentions with worldly desires. The former receives full reward, while the latter's reward is diminished or nullified based on their intention.

This teaching encourages constant self-examination (muhasabah) of one's intentions and purifying them for Allah alone, making it a comprehensive guide for spiritual development.