عَنْ عُمَرَ بْنِ الْخَطَّابِ رَضِيَ اللَّهُ عَنْهُ قَالَ: قَالَ رَسُولُ اللَّهِ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ: «إِنَّمَا الْأَعْمَال بِالنِّيَّاتِ وَإِنَّمَا لكل امْرِئ مَا نَوَى فَمَنْ كَانَتْ هِجْرَتُهُ إِلَى اللَّهِ وَرَسُولِهِ فَهِجْرَتُهُ إِلَى اللَّهِ وَرَسُولِهِ وَمَنْ كَانَتْ هِجْرَتُهُ إِلَى دُنْيَا يُصِيبُهَا أَوِ امْرَأَةٍ يَتَزَوَّجُهَا فَهجرَته إِلَى مَا هَاجر إِلَيْهِ»
Translation
‘Umar b. al-Khattab, for whom God’s good pleasure is prayed, reported God’s Messenger, to whom may God’s blessings and safe-keeping be granted, as saying

“Deeds are to be judged only by intentions, and a man will have only what he intended. When one’s emigration is to God and His Messenger, his emigration is to God and His Messenger; but when his emigration is to a worldly end at which he aims, or to a woman whom he marries, his emigration is to that to which he emigrated.” (Bukhari and Muslim.)

Comment

The Foundation of All Actions

This noble hadith establishes that the value and acceptance of all deeds depend solely upon the intention (niyyah) behind them. The scholar Ibn Rajab al-Hanbali states this hadith constitutes one-third of Islam, for actions are of three types: those of the heart, tongue, and limbs—and intention governs them all.

The Reality of Intention

Intention is the conscious purpose and resolve in the heart that distinguishes worship from habit, and one act of worship from another. Imam al-Nawawi explains that intention is the spirit of action and its foundation. Without proper intention, even outwardly correct actions become spiritually void.

The hadith clarifies that reward is tied to what one intends. If one performs an act seeking Allah's pleasure, they receive that reward. If they intend worldly gain, they receive only that worldly gain without spiritual reward.

The Example of Emigration

The Prophet ﷺ used the example of emigration (hijrah) to illustrate this principle. When one emigrates purely for Allah and His Messenger, the action is recorded as such. However, if one emigrates for worldly objectives—such as wealth or marriage—then the emigration is recorded according to that worldly intention.

This demonstrates how identical outward actions receive different spiritual valuations based on the heart's orientation. The physical hijrah of both individuals may appear the same, but their spiritual realities differ completely.

Scholarly Commentary

Al-Qadi 'Iyad notes this hadith teaches us to purify our intentions in all matters, making our ultimate goal the pleasure of Allah. Actions must be performed for His sake alone, without seeking praise, recognition, or worldly benefit.

Ibn Daqiq al-'Eid emphasizes that intention distinguishes between obedience and disobedience, and between different types of worship. The same physical movement could be prayer or exercise depending on the intention behind it.

Practical Application

This teaching requires Muslims to regularly examine their intentions in worship, business transactions, social interactions, and all aspects of life. The sincere Muslim constantly renews their intention, seeking to direct all actions toward Allah's pleasure.

Scholars note that maintaining pure intention requires spiritual struggle (mujahadah) against the ego's tendencies toward showing off (riya') and seeking worldly validation. The reward is proportional to the sincerity achieved.