Sahih al-Bukhari 6689
Book 83: Oaths and Vows · Hadith 66
Hadith text
Narrated `Umar bin Al-Khattab:I heard Allah's Messenger (ﷺ) saying, "The (reward of) deeds, depend upon the intentions and every person will get the reward according to what he has intended. So whoever emigrated for the sake of Allah and His Apostle, then his emigration will be considered to be for Allah and His Apostle, and whoever emigrated for the sake of worldly gain or for a woman to marry, then his emigration will be considered to be for what he emigrated for
Umar bin Al-Khattab bataate hain: Maine Allah ke Rasool (SAW) ko ye farmaate suna, '(Amaal ka) ajr niyaton par nirbhar karta hai, aur har shaks ko wo milega jo usne iraada kiya. Isliye jo koi Allah aur uske Rasool ke liye hijrat kare, uski hijrat Allah aur uske Rasool ke liye maani jaayegi, aur jo koi duniya ke faayde ke liye ya kisi khaatoon se shaadi karne ke liye hijrat kare, uski hijrat usi cheez ke liye maani jaayegi jiske liye usne hijrat ki.'
Sahih al-Bukhari 6689 · Book 83, Hadith 66