حَدَّثَنَا عَبْدُ الرَّحْمَنِ بْنُ مَهْدِيٍّ، عَنْ سُفْيَانَ، عَنْ أَبِي إِسْحَاقَ، عَنْ حَارِثَةَ، قَالَ جَاءَ نَاسٌ مِنْ أَهْلِ الشَّامِ إِلَى عُمَرَ رَضِيَ اللَّهُ عَنْهُ فَقَالُوا إِنَّا قَدْ أَصَبْنَا أَمْوَالًا وَخَيْلًا وَرَقِيقًا نُحِبُّ أَنْ يَكُونَ لَنَا فِيهَا زَكَاةٌ وَطَهُورٌ قَالَ مَا فَعَلَهُ صَاحِبَايَ قَبْلِي فَأَفْعَلَهُ وَاسْتَشَارَ أَصْحَابَ مُحَمَّدٍ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ وَفِيهِمْ عَلِيٌّ رَضِيَ اللَّهُ عَنْهُ فَقَالَ عَلِيٌّ هُوَ حَسَنٌ إِنْ لَمْ يَكُنْ جِزْيَةً رَاتِبَةً يُؤْخَذُونَ بِهَا مِنْ بَعْدِكَ‏.‏
Translation
`Alqamah bin Waqqas al Laithi said that he heard `Umar bin al-Khattab addressing the people, and he said

I heard the Messenger of Allah (ﷺ) say: “Action is but by intention and each person will have but that which he intended. So whoever migrated for the sake of Allah and His Messenger, then his migration was for the sake of Allah and His Messenger, whoever migrated for some worldly purpose or for the sake of a woman whom he could marry, his migration was for the purpose for which he migrated.”

Comment

Hadith of Intention: Commentary on Musnad `Umar b. al-Khattab (ra)

This profound narration from Musnad Ahmad 300, transmitted through the esteemed companion `Umar ibn al-Khattab (ra), establishes the fundamental principle that all deeds are judged according to their underlying intentions (niyyah). The Messenger of Allah (ﷺ) begins with "Actions are but by intention," meaning the validity and acceptance of any act of worship before Allah depends entirely upon the sincerity of purpose in the heart.

The Two Categories of Intention

The hadith presents a clear dichotomy: migration (hijrah) for Allah and His Messenger versus migration for worldly gain or marriage. This serves as a universal example. The first category represents pure devotion (ikhlas), where the act is performed solely to seek Allah's pleasure and obey His command. Such an action, even if outwardly small, carries immense spiritual weight.

The second category illustrates actions performed for worldly or personal desires. While the physical act of migration is the same, the spiritual reality and divine reward are entirely different. The individual will only receive what they intended—the worldly objective—and will be deprived of the reward for the act of worship itself.

Scholarly Elucidation from Musnad Ahmad

The scholars explain that this hadith is a cornerstone of Islamic jurisprudence. It teaches that an act of worship (ibadah) is invalid without a correct intention, and it distinguishes between habits and acts of devotion. For instance, washing could be mere hygiene or the ritual purification (wudu) for prayer, differentiated only by intention.

Furthermore, the phrase "each person will have but that which he intended" is a severe warning. It means that on the Day of Judgment, a person will find their book of deeds filled only with what their heart truly intended, not merely what their limbs performed. This necessitates constant vigilance over one's inner state and motives.

Practical Application for the Believer

This teaching obligates the Muslim to purify their intentions before every righteous deed, seeking only Allah's Countenance. It is a call to rectify the heart, making it the foundation of a sound and accepted religious practice. One must frequently renew their intention, guarding it from the whispers of ostentation (riya') and other corrupting influences.