A man asked, "Messenger of Allah, which migration is best?"He replied, "That you abandon what your Lord dislikes." The Messenger of Allah ﷺ said, "Migration is of two kinds, the migration of the settled dweller and the migration of the desert nomad. As for the nomad, he responds when summoned and obeys when commanded. As for the settled dweller, his trial is greater and his reward is greater."
أخبرنا أحمد بن عبد الله بن الحكم قال حدثنا محمد بن جعفر قال حدثنا شعبة عن عمرو بن مرة عن عبد الله بن الحارث عن أبي كثير
قال رجل يا رسول الله أي الهجرة أفضل قال أن تهجر ما كره ربك عز وجل وقال رسول الله ﷺ الهجرة هجرتان هجرة الحاضر وهجرة البادي فأما البادي فيجيب إذا دعي ويطيع إذا أمر وأما الحاضر فهو أعظمهما بلية وأعظمهما أجرا
[Its isnad is sahih] Ahmad narrated it: 2/159, 160, from the hadith of Shubah, in full, and it is also in Al-Kubra, no. 7788. Ibn Hibban graded it sahih, no. 1080, 1581, and so did Hakim, 1/11. The hadith has supporting narrations with Hasan bin Arafah (904) and others.* Abu Kathir is trustworthy, his name being Zuhayr bin Aqmar Zubaydi.