Islam Academy

Musnad Ahmad

Book 2Hadith Number 168
ENOfficial

Umar said: I heard the Messenger of Allah (ﷺ) ﷺ say: `Deeds are but by intentions and each man will have but that which he intended. If a man's migration was for the sake of Allah, then his migration was for that for which he migrated, but if his migration was to achieve some worldly aim or to take some woman in marriage, his migration was for that for which he migrated.`

Source: sunnah.com

Other translations

Arabic

حَدَّثَنَا سُفْيَانُ، عَنْ يَحْيَى، عَنْ مُحَمَّدِ بْنِ إِبْرَاهِيمَ التَّيْمِيِّ، عَنْ عَلْقَمَةَ بْنِ وَقَّاصٍ، قَالَ سَمِعْتُ عُمَرَ، رَضِيَ اللَّهُ عَنْهُ يَقُولُ سَمِعْتُ رَسُولَ اللَّهِ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ يَقُولُ إِنَّمَا الْأَعْمَالُ بِالنِّيَّةِ وَلِكُلِّ امْرِئٍ مَا نَوَى فَمَنْ كَانَتْ هِجْرَتُهُ إِلَى اللَّهِ عَزَّ وَجَلَّ فَهِجْرَتُهُ إِلَى مَا هَاجَرَ إِلَيْهِ وَمَنْ كَانَتْ هِجْرَتُهُ لِدُنْيَا يُصِيبُهَا أَوْ امْرَأَةٍ يَنْكِحُهَا فَهِجْرَتُهُ إِلَى مَا هَاجَرَ إِلَيْهِ‏.‏

sunnah.com