The Prophet ﷺ said, "Worship during times of turmoil is like emigrating to me."
أن النبي ﷺ قال: العبادة في الهرج كهجرة إلي.
No references are available.
Muslim narrated it in the Book of Tribulations and the Signs of the Hour (2948) through several routes from Hammad bin Zayd, from Mualla bin Ziyad, from Muawiya bin Qurra, from Maqil bin Yasar, who related it.Regarding his saying, "during al-harj," Nawawi said, "What is meant by al-harj here is tribulation and the confusion of people's affairs, and the reason for the great merit of worship during it is that people neglect it and become preoccupied away from it, so that only isolated individuals devote themselves to it."