أَخْبَرَنَا أَحْمَدُ بْنُ عَبْدِ اللَّهِ بْنِ الْحَكَمِ، قَالَ حَدَّثَنَا مُحَمَّدُ بْنُ جَعْفَرٍ، قَالَ حَدَّثَنَا شُعْبَةُ، عَنْ عَمْرِو بْنِ مُرَّةَ، عَنْ عَبْدِ اللَّهِ بْنِ الْحَارِثِ، عَنْ أَبِي كَثِيرٍ، عَنْ عَبْدِ اللَّهِ بْنِ عَمْرٍو، قَالَ قَالَ رَجُلٌ يَا رَسُولَ اللَّهِ أَىُّ الْهِجْرَةِ أَفْضَلُ قَالَ ‏"‏ أَنْ تَهْجُرَ مَا كَرِهَ رَبُّكَ عَزَّ وَجَلَّ ‏"‏ ‏.‏ وَقَالَ رَسُولُ اللَّهِ صلى الله عليه وسلم ‏"‏ الْهِجْرَةُ هِجْرَتَانِ هِجْرَةُ الْحَاضِرِ وَهِجْرَةُ الْبَادِي فَأَمَّا الْبَادِي فَيُجِيبُ إِذَا دُعِيَ وَيُطِيعُ إِذَا أُمِرَ وَأَمَّا الْحَاضِرُ فَهُوَ أَعْظَمُهُمَا بَلِيَّةً وَأَعْظَمُهُمَا أَجْرًا ‏"‏ ‏.‏

It was narrated that 'Abdullah bin 'Amr said: "A man said: 'O Messenger of Allah! Which emigration (Hijrah) is best?' He said: 'To leave what your Lord, the Mighty and Sublime, dislikes.' He said: 'There are two kinds of emigration, the emigration of the town dweller and the emigration of the Bedouin. As for the Bedouin, when he is called (to fight in Jihad) he must respond, and he must obey when he is commanded, and as for the town dweller, he is the one who is more severely tested and more greatly rewarded."' Translation Not Available

Book Ref: Sunan An Nisai Book 39 Hadith 4165
Web Ref:  Sunan An Nisai Vol 5 Book 39 Hadith 4170