The one that every collection opens with
The example given is a man moving house.
The words
الأَعْمَالُ بِالنِّيَّةِ، وَلِكُلِّ امْرِئٍ مَا نَوَى، فَمَنْ كَانَتْ هِجْرَتُهُ إِلَى اللَّهِ وَرَسُولِهِ، فَهِجْرَتُهُ إِلَى اللَّهِ وَرَسُولِهِ
Al-aʿmālu bi-n-niyyah, wa li-kulli-mriʾin mā nawā. Fa-man kānat hijratuhu ilā-Llāhi wa rasūlih, fa-hijratuhu ilā-Llāhi wa rasūlih
Actions are by intention, and every person has what he intended. So whoever emigrated to Allah and His Messenger, his emigration was to Allah and His Messenger.
Where this comes from
And whoever emigrated for some worldly thing to get, or a woman to marry, his emigration was to what he emigrated to. The same road, the same distance, the same hardship, and two entirely different journeys.
The full narration
Narrated 'Umar bin Al-Khattab: Allah's Messenger (ﷺ) said, "The reward of deeds depends upon the intention and every person will get the reward according to what he has intended. So whoever emigrated for Allah and His Apostle, then his emigration was for Allah and His Apostle. And whoever emigrated for worldly benefits or for a woman to marry, his emigration was for what he emigrated for
Source
Ṣaḥīḥ al-Bukhārī · 54
- Recorded in Ṣaḥīḥ al-Bukhārī, whose narrations are accepted as authentic