The Prophet (peace and blessings be upon him) said:
"Actions are only according to intentions, so each man will have what he intended. Therefore, whoever’s migration (hijrah) was to Allah and His Messenger, his migration is to Allah and His Messenger; and whoever’s migration was for some worldly gain, or to marry a woman, his migration is to that for which he migrated."
This hadith is one of the foundational hadiths in Islam, let's look into some of the meanings behind it.
The hadith shows that our worship and good deeds must be done for the sake of Allah. This includes our prayer, fasting, charity, help to relatives and those in need, and all other types of worship. Intention is an important criteria for our deeds to be accepted and rewarded.
Shahadah also demonstrates the same principle. The phrase “I testify that there is no god but Allah” signifies that He is the only One deserving of our worship. The opposite of sincerity is hypocrisy, and we ask Allah’s protection from it.
Importantly, our everyday routines such as sleep, work, and family life, can become worship through intention. We sleep to restore our strength and wake up in the morning for prayer. We exercise to stay healthy and worship Allah. We raise children so that they become good Muslims. We treat people justly because they are the creation of Allah, and have God-given dignity and rights.
Important to note, that a wrong action remains wrong even if the intention is good. Therefore, whatever we intend to do, has to be lawful in accordance with the shari'ah.
Of course, being sincere is difficult, as often we have a mix of motives in our actions. Absolute sincerity is the success that comes only from Allah, so we should ask Him to make us sincere and to accept our deeds.
As an example, the Quran mentions two prophets (peace be upon them) asking Him to accept their work:
And remember Abraham and Ishmael raised the foundations of the House: "Our Lord! Accept this from us, verily You are the All-Hearing, the All-knowing. [al-Baqarah, 127]
The “migration” (in Arabic “hijrah”), which is referred to in the hadith, is the migration of the first Muslims from Mecca to Al-Medina. They had to leave their home because of being persecuted. Some even had to leave behind all their wealth, as the Meccans wouldn’t let them migrate with their belongings. Such cases were repeated in history, and Muslims had to emigrate to other lands in order to maintain the opportunity to practice Islam. In a peaceful context, migration is more of a spiritual act, when a person firmly decides to leave sin and do what Allah has commanded. Therefore, the decision to start praying and to leave the «haram» is also a migration.
May Allah make us sincere and accept our deeds!