حَدَّثَنَا الْحُمَيْدِيُّ عَبْدُ اللَّهِ بْنُ الزُّبَيْرِ، قَالَ حَدَّثَنَا سُفْيَانُ، قَالَ حَدَّثَنَا يَحْيَى بْنُ سَعِيدٍ الأَنْصَارِيُّ، قَالَ أَخْبَرَنِي مُحَمَّدُ بْنُ إِبْرَاهِيمَ التَّيْمِيُّ، أَنَّهُ سَمِعَ عَلْقَمَةَ بْنَ وَقَّاصٍ اللَّيْثِيَّ، يَقُولُ سَمِعْتُ عُمَرَ بْنَ الْخَطَّابِ ـ رضى الله عنه ـ عَلَى الْمِنْبَرِ قَالَ سَمِعْتُ رَسُولَ اللَّهِ ﷺ يَقُولُ “ إِنَّمَا الأَعْمَالُ بِالنِّيَّاتِ، وَإِنَّمَا لِكُلِّ امْرِئٍ مَا نَوَى، فَمَنْ كَانَتْ هِجْرَتُهُ إِلَى دُنْيَا يُصِيبُهَا أَوْ إِلَى امْرَأَةٍ يَنْكِحُهَا فَهِجْرَتُهُ إِلَى مَا هَاجَرَ إِلَيْهِ ”.
Narrated ʿUmar b. al-Khaṭṭāb (raḍ. ʿanhu):
I heard Allāh's Messenger ﷺ saying, "The reward of deeds depends upon the intentions, and every person will get the reward according to what he has intended. So whoever emigrated for worldly benefits or for a woman to marry, his emigration was for what he emigrated for."
Ṣaḥīḥ al-Bukhārī Ḥadīth 1
ʿAbd Allāh b. Masʿūd relates that a man emigrated to marry a woman called Umm Qays, and he came to be known as muhājir Umm Qays, the one who emigrated for Umm Qays.
Some scholars have argued that the ال in الأعمال has come for istighrāq, encompassing all, that is, every action is judged by its intention. Take a man who goes a whole day without eating, but without the intention to fast: he earns no reward for the abstention. Take, on the other hand, a man who intends to fast and then does not eat the whole day: he is rewarded.
al-Ḥumaydī: his name is ʿAbd Allāh b. al-Zubayr al-Ḥumaydī (d. 219H), also known as al-Makkī. It has been said that Imām al-Bukhārī began his book with the narration of al-Ḥumaydī because of his link to Makkah, the place where waḥy began.1
Sufyān: his name is Sufyān b. ʿUyaynah al-Makkī al-Tābiʿī (d. 198H).2 He completed Ḥajj seventy times,3 and is reported to have heard from seventy tābiʿīn.4
Yaḥyā b. Saʿīd al-Anṣārī (d. 143H)5 was from the ṣighār al-tābiʿīn. His grandfather was Qays b. ʿAmr, who was a Ṣaḥābī. His teacher was Muḥammad b. Ibrāhīm al-Taymī (d. 120H),6 from the awsaṭ al-tābiʿīn; his teacher in turn was ʿAlqamah b. Waqqāṣ al-Laythī, from the kibār al-tābiʿīn.7
Ibn Ḥajar notes that this ḥadīth is brought here purely for blessings: Imām al-Bukhārī brings it to remind himself, and others, of the importance of having good intentions before beginning an act. ʿAbd al-Raḥmān b. Mahdī echoes the point, saying that this ḥadīth should be placed at the head of every chapter.
It has also been suggested that the ḥadīth fulfils the role of a khuṭbah for the kitāb. ʿUmar (raḍ. ʿanhu) was giving a khuṭbah in the presence of the Ṣaḥābah when he related it, and Imām al-Bukhārī might be letting this stand in for the customary khuṭbah of his own book. If so, however, it would have been more natural to place the ḥadīth before the tarjamah (the chapter heading), as others have done.
Ibn Munīr offers a further reason: at the beginning of prophethood the Prophet ﷺ would travel to the cave of Ḥirāʾ for the sake of Allāh, and so the ḥadīth has a thematic link, since it speaks of emigration for the sake of Allāh.
ʿAllāmah Sahāranpūrī notes that one reason Imām al-Bukhārī brought this ḥadīth first is that it is the first ḥadīth the Prophet ﷺ narrated when he arrived in Madīnah.8
A further reason may be that the ḥadīth is bound up with the word بدء, beginning. All beginnings are to be made with ikhlāṣ (sincerity); since Imām al-Bukhārī is talking here about the start of waḥy, and likewise about the start of his own book, he begins with this ḥadīth.
A biographical sketch of Imām al-Bukhārī: his lineage, character, scholarly competence, teachers, students, madhhab, writings, and death.
The opening chapter of Ṣaḥīḥ al-Bukhārī: why Imām al-Bukhārī begins with revelation, the meaning of waḥy, and the forms it takes.
How Imām al-Bukhārī came to compile his Ṣaḥīḥ: its name, scope, method of writing, places of authorship, and the principal commentaries upon it.
The opening ḥadīth of Imām al-Nawawī's Forty: actions are judged by their intentions, and a person has of an act only what they intended by it.