حَدَّثَنَا عَبْدُ اللَّهِ بْنُ مَسْلَمَةَ بْنِ قَعْنَبٍ حَدَّثَنَا مَالِکٌ عَنْ يَحْيَی بْنِ سَعِيدٍ عَنْ مُحَمَّدِ بْنِ إِبْرَاهِيمَ عَنْ عَلْقَمَةَ بْنِ وَقَّاصٍ عَنْ عُمَرَ بْنِ الْخَطَّابِ قَالَ قَالَ رَسُولُ اللَّهِ صَلَّی اللَّهُ عَلَيْهِ وَسَلَّمَ إِنَّمَا الْأَعْمَالُ بِالنِّيَّةِ وَإِنَّمَا لِامْرِئٍ مَا نَوَی فَمَنْ کَانَتْ هِجْرَتُهُ إِلَی اللَّهِ وَرَسُولِهِ فَهِجْرَتُهُ إِلَی اللَّهِ وَرَسُولِهِ وَمَنْ کَانَتْ هِجْرَتُهُ لِدُنْيَا يُصِيبُهَا أَوْ امْرَأَةٍ يَتَزَوَّجُهَا فَهِجْرَتُهُ إِلَی مَا هَاجَرَ إِلَيْهِ
صحیح مسلم · Hadith 4927
It has been narrated on the authority of Umar b. al-Khattab that the Messenger of Allah ( صلی اللہ علیہ وسلم ) said: (The value of) an action depends on the intention behind it. A man will be rewarded only for what he intended. The emigration of one who emigrates for the sake of Allah and His Messenger ( صلی اللہ علیہ وسلم ) is for the sake of Allah and His Messenger ( صلی اللہ علیہ وسلم ) ; and the emigration of one who emigrates for gaining a worldly advantage or for marrying a woman is for what he has emigrated.
Translated by Dr. Muhammad Muhsin Khan · Reviewed by Islamic University of Madinah · Published March 2020
