روي أنه قال رسول الله صلى الله عليه وسلم: إنما الأعمال بالنيات وإنما لكل إمرئ ما نوى فمن كانت هجرته إلى الله ورسوله فهجرته إلى الله ورسوله ومن كانت هجرته إلى دنيا يصيبها أو امرأة يتزوجها فهجرته إلى ما هاجر إليه
It is narrated that the Prophet (pbuh) said: "[The reward1 of pious2] Deeds are dependent only upon intentions3 [of the performers]. Every person shall only get that, which he actually intended [while performing a pious deed4]. Thus, whoever actually migrates5 towards [another land, for] God and His Prophet6, his migration shall be [counted in the Hereafter, as one] toward God and His Prophet [and shall, thus, follow great rewards]; while, whoever migrates toward [another land, for] a worldly gain, which he wants to earn or a woman, whom he wants to marry, his migration shall be [counted in the Hereafter, as one] toward what he actually intended it for [and shall, thus, carry no weight in the eyes of God]"'.
It is, in fact, the promised rewards in the hereafter for pious deeds that is discussed in this narrative. This fact is further elaborated by the clarification: "Man shall only get that, which he actually intended".
It is only the pious deeds that are under consideration in this narrative.
'Niyyah' (intention) does not refer to any utterances of the tongue. On the contrary, it refers to a person's hidden motives in performing a particular act.
A person may perform a pious deed to show his piety to others or to be known in his friends as a pious individual or to get any other worldly or immediate benefit. This statement implies that it is not merely the performance of good deeds that qualifies a person for rewards in the hereafter; it is, in fact, good deeds performed solely for God's pleasure that shall have any weight on that Day.
It seems that the reported saying relates to the time when the Qur'an had directed the Muslims residing in Mekkah to migrate to Medinah.
A prophet of God is, in fact, God's representative on earth. The prophet of God, sent in a particular people is the sole source of knowledge of God's directives and likes and dislikes, for that people. Thus, in matters of the Shari`ah, true piety emanates from obedience to the prophet of God. The words 'for God and His Prophet' actually implies that the 'good deed' should be performed for the pleasure of God and according to the directives of His Prophet.
Notes on the Text of the Narrative:
This narrative or a part of it, with minor variations, has been reported in: Bukhariy (narrative no. 1, 52, 2344, 3609, 4682, 6195 and 6439), Muslim (narrative no. 3530), Tirmidhiy (narrative no. 1571), Nasaa'iy (narrative no. 74, 3383 and 3734), Abu Dawood (narrative no. 1882), Ibn Maajah (narrative no. 4217), Ahmad Ibn Hanbal (narrative no. 163 and 283), Ibn Khuzaymah (narrative no. 142, 143 and 455), Ibn Hibban (narrative no. 388, 389 and 4868), Bayhaqiy (narrative no. 181, 182, 972, 1321, 2087, 7162, 7897, 8774, 12686 and 14773), Darqutniy (narrative no. 1) and Humaydiy (narrative no. 128). The selected narrative is reported in Bukhariy (narrative no. 6195), on the authority of Omar Ibn Al-Khattab (ra), except where otherwise specified.
In Bukhariy's narrative no. 6195, the opening sentence has been reported as: the opening sentence has been reported as: "إنما الأعمال بالنية" (i.e., 'Deeds are dependent only upon intention'). Our preferred sentence "إنما الأعمال بالنيات" (i.e., 'Deeds are dependent only upon intentions') has been reported in Bukhariy, narrative no. 1. Similarly, the sentence "وإنما لكل إمرئ ما نوى" (i.e., 'Each man shall only get that, which he actually intended') - as reported in Bukhariy's narrative no. 1 - has been rendered as "وإنما لإمرئ ما نوى" (i.e., 'Man shall only get that, which he actually intended').
(This write-up is prepared by the Hadith Cell of Javed Ahmad Ghamidi)