I heard Allah's Messenger (ﷺ) saying, "The (reward of) deeds, depend upon the intentions and every person will get the reward according to what he has intended. So whoever emigrated for the sake of Allah and His Apostle, then his emigration will be considered to be for Allah and His Apostle, and whoever emigrated for the sake of worldly gain or for a woman to marry, then his emigration will be considered to be for what he emigrated for."
Hadith of Intentions - Sahih al-Bukhari 6689
This foundational hadith from the Book of Oaths and Vows establishes the principle that all actions are judged by their underlying intentions (niyyah).
Scholarly Commentary
The scholars explain that this hadith forms one-third of Islamic knowledge, as it distinguishes between acts of worship and worldly customs. Imam al-Nawawi states it clarifies that deeds without proper intention are invalid.
The emigration (hijrah) example demonstrates how identical outward actions yield different spiritual rewards based on intention. One who emigrates for Allah receives full reward, while one who emigrates for worldly purposes receives only what they intended.
Legal Implications
This principle applies to all acts of worship: purification requires intention for prayer to be valid, fasting requires conscious intention before dawn, and charity must be given purely for Allah's pleasure.
Scholars emphasize that good intentions transform ordinary permissible actions into acts of worship when accompanied by the aim of drawing closer to Allah.
Spiritual Dimensions
Ibn Rajab al-Hanbali notes this hadith teaches sincerity (ikhlas) - purifying one's intention from worldly motives and seeking only Allah's pleasure.
The continuous renewal of intention is essential, as intentions may change during actions. The righteous predecessors would frequently examine and rectify their intentions.