A man asked, "Messenger of Allah, which migration is best?"He replied, "That you forsake what your Lord dislikes." The Messenger of Allah ﷺ also said, "Migration is of two kinds, the migration of the city dweller and the migration of the desert dweller. As for the desert dweller, he responds when summoned and obeys when commanded. As for the city dweller, his trial is the greater of the two, and his reward is the greater of the two."
قال رجل يا رسول الله! أي الهجرة أفضل؟ قال: أن تهجر ما كره ربك عز وجل وقال: رسول الله ﷺ: الهجرة هجرتان، هجرة الحاضر وهجرة البادي. فأما البادي فيجيب إذا دعي، ويطيع إذا أمر، وأما الحاضر فهوأعظمها بلية، وأعظمها أجرا.
Nasai (4165) narrated it, and Ibn Hibban (4863) graded it sahih, both from the hadith of Amr bin Mura, from Abdullah bin Harith, from Abu Kathir Zubaydi, from Abdullah bin Amr, who mentioned it. Its chain of transmission is sahih.