Yes. The hadith of Umar ibn al-Khattab (ra), 'Actions are but by intentions', is authentic, being in Sahih al-Bukhari 1 and Sahih Muslim 1907, and it is one of the foundations of Islamic law and ethics. It means that an act's religious value, and in many cases its legal effect, depends on the intention with which it was done. It does not mean that a good intention makes a forbidden act permitted.
- The text: 'Actions are by intentions, and each person will have only what he intended.'
- Law: intention distinguishes worship from habit (washing to cool down or to purify) and affects contracts and oaths.
- Ethics: sincerity (ikhlas) means doing deeds for Allah alone; showing off (riya') destroys reward.
- Scholars differ: on whether intention is required for wudu (not for the Hanafis) and whether it should be spoken.
Introduction
The hadith of intention is the first hadith in Sahih al-Bukhari, and many scholars from later centuries began their books with it. The question here is whether all actions truly depend on intention, as the hadith seems to say. The answer is yes in a defined sense, and the limits of that sense matter, because the hadith has been misused to excuse wrong acts and has also been feared by those who worry they never feel enough sincerity.
This answer gives the text and its chain, explains the story behind it, sets out what the jurists derive from it in law and what the scholars of the heart derive from it, shows where the schools differ, and ends with the misuses it does not allow.
The text and its transmission
Umar ibn al-Khattab (ra) said from the pulpit that he heard the Messenger of Allah (saw) say that actions are only by intentions and that each person will have only what he intended. He who migrated for Allah and His Messenger, his migration is for Allah and His Messenger; and he who migrated for a worldly gain or a woman to marry, his migration is for what he migrated for (Sahih al-Bukhari 1, Sahih Muslim 1907).
The hadith is called gharib at its beginning: for the first three links it is carried by one narrator each, from Umar (ra) to Alqama ibn Waqqas, then to Muhammad ibn Ibrahim al-Taymi and then to Yahya ibn Sa'id al-Ansari. After Yahya it spread widely among the narrators. Imam al-Bukhari placed it first to teach that every work must begin with the right intention, and Imam al-Nawawi placed it first in his Forty Hadith and in Riyad al-Salihin for the same reason. Several early scholars are reported to have called it one of the three or four hadith on which Islam turns, though the precise attribution of these sayings should be checked in the sources before it is repeated.
The story of the migrant
A well-known story says that the hadith was said about a man who migrated to Madina in order to marry a woman called Umm Qays and was called 'the migrant of Umm Qays'. The story is not in the two Sahihs, and scholars treat its chain with caution, so it should not be treated as the established cause of the hadith. The wording of the hadith itself is enough to show its meaning. The Prophet (saw) took the great act of hijra, which stood for sacrifice for the faith, and showed that two men could make the same journey with the same hardship and yet have utterly different standing with Allah.
What the jurists derive from it
Jurists use the hadith to distinguish between acts of worship ('ibadat) and acts of custom ('adat). A person can wash his body on a hot day or to cool down, or wash as wudu, and the outward act is the same; only the intention makes it an act of worship. The same is true of fasting, which differs from simple hunger, of giving, which differs from paying a debt, and of standing and bowing, which differs from exercise.
On this basis the Maliki, Shafi'i and Hanbali schools require intention for wudu and ghusl. The Hanafi school does not require it for wudu performed with water, because water purifies by its nature, although they require it for tayammum, since earth does not purify by its nature; the Hanafis still reward the intention to seek closeness to Allah. Everyone agrees that the intention is needed for prayer, fasting, zakat, hajj and umra.
The principle also affects contracts. A sale made in jest may bind in some schools, but a divorce expressed in an ambiguous phrase (kinaya) takes effect only if the husband intended divorce by it. The jurists also apply the principle to oaths, to killing (where the intention separates deliberate from accidental homicide) and to the intention behind a gift, the way a person makes a loan or a donation, and the purpose of a business.
Where does the intention belong?
The place of intention is the heart. The Prophet (saw) is not reported to have said 'I intend to pray' before his prayers, and Ibn al-Qayyim, in Zad al-Ma'ad, notes that he did not pronounce the intention aloud. For this reason the Hanbali and Maliki scholars say that speaking it is not required, and many consider it an innovation if done as a ritual; the Shafi'i school treats the spoken form as recommended in order to help the heart, a view stated by al-Nawawi, but it is not a condition. A person who stands to pray the noon prayer and knows which prayer it is has made the intention.
The intention should also be present at the beginning, and need not be renewed constantly. If a person's mind wanders in the prayer, it is still valid; the Qur'an does not require a perfectly focused heart for validity, though it commends humility (khushu') in prayer (23:1 to 2).
Sincerity and showing off
The scholars of the heart derive another lesson: a lawful act performed for creatures and not for Allah is lost. The Qur'an says that the believers were commanded only to worship Allah, being sincere to Him in religion:
وَمَا أُمِرُوا إِلَّا لِيَعْبُدُوا اللَّهَ مُخْلِصِينَ لَهُ الدِّينَ حُنَفَاءَ
And they were not commanded except to worship Allah, being sincere to Him in religion, inclining to truth. (Qur'an 98:5)
The hadith in Sahih Muslim 1905 describes three people who will be the first judged on the Day of Resurrection: a man who died in battle, a scholar and reciter of the Qur'an, and a wealthy man who gave in charity. Each is asked what he did with Allah's favour, each claims to have done good, and each is told that he did it so that people would say it, and they said it. Then they are dragged on their faces into the Fire. The hadith is among the most feared in the tradition, and it is meant to be, but the scholars note that its subject is the person whose whole motive was display, not the person who feels a passing thought of pride and rejects it.
A sincere person may still be seen doing good, and the Prophet (saw) described a person's good deeds, done openly, as bringing the praise of people as a glad tiding for the believer (Sahih Muslim). Concealing is better for voluntary acts, and showing is sometimes better when it encourages others.
What the hadith does not mean
It does not mean that a good intention makes a forbidden act lawful. A person who steals in order to give to the poor has sinned; the intention does not transform the act. This is the consensus of the jurists. The Qur'an condemns those who offered wrong deeds and thought they did well (18:103 to 104).
It does not mean that a Muslim must examine every motive until he is paralysed. Imam al-Nawawi and Ibn Rajab in Jami' al-'Ulum wa'l-Hikam explain that the believer should renew his intention, ask Allah for sincerity and continue doing good, and not abandon an act because he fears showing off, since abandonment would itself be a victory for Satan.
It does not mean that an intention to do good, without effort, is the same as action. The Prophet (saw) said that whoever intends a good deed and does not do it, Allah records it as one complete good deed (Sahih al-Bukhari 6491 and Sahih Muslim 131), and if he does it, it is recorded ten times up to seven hundred times; but an intention is only that, and an actual deed carries more.
Conclusion
The hadith of intention is authentic and fundamental: the worth and often the legal effect of an act depend on what the person intended. It separates worship from habit, shapes contracts and oaths, and demands sincerity, but it never makes a forbidden act lawful. Renew your intention often and ask Allah for sincerity.
References
Qur'an 18:103 to 104, 23:1 to 2, 98:5
Sahih al-Bukhari 1, 56 and 6491; Sahih Muslim 131, 1905 and 1907
al-Nawawi, al-Arba'un al-Nawawiyya, hadith 1, and Sharh Sahih Muslim
Ibn Rajab al-Hanbali, Jami' al-'Ulum wa'l-Hikam, hadith 1
Ibn al-Qayyim, Zad al-Ma'ad, on the prayer of the Prophet (saw)
Ibn Hajar al-'Asqalani, Fath al-Bari, commentary on the first hadith