حَدَّثَنَا عَبْدُ الرَّحْمَنِ بْنُ مَهْدِيٍّ، عَنْ سُفْيَانَ، عَنْ أَبِي إِسْحَاقَ، عَنْ حَارِثَةَ، قَالَ جَاءَ نَاسٌ مِنْ أَهْلِ الشَّامِ إِلَى عُمَرَ رَضِيَ اللَّهُ عَنْهُ فَقَالُوا إِنَّا قَدْ أَصَبْنَا أَمْوَالًا وَخَيْلًا وَرَقِيقًا نُحِبُّ أَنْ يَكُونَ لَنَا فِيهَا زَكَاةٌ وَطَهُورٌ قَالَ مَا فَعَلَهُ صَاحِبَايَ قَبْلِي فَأَفْعَلَهُ وَاسْتَشَارَ أَصْحَابَ مُحَمَّدٍ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ وَفِيهِمْ عَلِيٌّ رَضِيَ اللَّهُ عَنْهُ فَقَالَ عَلِيٌّ هُوَ حَسَنٌ إِنْ لَمْ يَكُنْ جِزْيَةً رَاتِبَةً يُؤْخَذُونَ بِهَا مِنْ بَعْدِكَ‏.‏
Translation
Umar said

I heard the Messenger of Allah ﷺ say: `Deeds are but by intentions and eachman will have but that which he intended. If a man's migration was for the sake of Allah, then his migration was for that for which he migrated, but if his migration was to achieve some worldly aim or to take some woman in marriage, his migration was for that for which he migrated.`

Comment

Exposition of the Hadith of Intentions

This noble hadith, narrated by Amir al-Mu'minin 'Umar ibn al-Khattab (ra) and recorded in Musnad Ahmad (168), serves as a fundamental pillar of Islam. The Prophet ﷺ commenced his statement with "Deeds are but by intentions," establishing that the validity and acceptance of all actions are contingent upon the purity and correctness of the intention behind them.

The Essence of Intention (Niyyah)

Intention is the spiritual orientation of the heart toward an objective. It is the soul of deeds and their foundation. An action, however great in appearance, is but a lifeless form without a sincere intention directed solely toward the pleasure of Allah, the Exalted.

The statement "each man will have but that which he intended" clarifies the divine recompense. On the Day of Judgment, a person will not be rewarded for the mere outward form of his deed, but for the objective his heart sought through it. If his intention was for Allah, his reward is with Allah. If it was for worldly gain or praise of men, then that is his recompense.

The Parable of Migration (Hijrah)

The Prophet ﷺ provided the clear example of migration (Hijrah) to illustrate this principle. The physical act of moving from one land to another is the same. However, its spiritual value and legal ruling differ entirely based on the intention.

One who migrates solely to please Allah and to preserve his religion, his migration is accepted and he attains its great reward. Another may perform the identical physical action, migrating to Medina, but if his aim was worldly—to seek trade, wealth, or to marry a woman—then his migration is for that worldly objective. He will not receive the reward for Hijrah, even though the external action is the same.

Scholarly Commentary

The scholars state that this hadith enters into every matter of religion and worldly life. It distinguishes between acts of worship and mere habits. For an act to be worship, it must be done with the intention of drawing nearer to Allah.

Imam al-Shafi'i said, "This hadith constitutes a third of knowledge, and it relates to seventy chapters of jurisprudence." This is because deeds are of three types: actions of the heart, the tongue, and the limbs. Intention is among the most crucial actions of the heart, hence its immense importance.

Conclusion and Benefit

Therefore, the Muslim must constantly purify his intentions, making them sincerely for Allah alone in all his statements, actions, and omissions. He should seek Allah's help in making his innermost thoughts and his outward state upright. This hadith is a scale for the servant to measure his deeds and a criterion for their acceptance.