Sunan Ibn Majah, Book 36, Hadith 60 (In-Book) ⓘ
It was narrated from Ma’qil bin Yasar that the Messenger of Allah said: “Worship during the time of bloodshed is like emigrating to me.”
حَدَّثَنَا حُمَيْدُ بْنُ مَسْعَدَةَ، حَدَّثَنَا جَعْفَرُ بْنُ سُلَيْمَانَ، عَنِ الْمُعَلَّى بْنِ زِيَادٍ، عَنْ مُعَاوِيَةَ بْنِ قُرَّةَ، عَنْ مَعْقِلِ بْنِ يَسَارٍ، قَالَ قَالَ رَسُولُ ـ صلى الله عليه وسلم ـ " الْعِبَادَةُ فِي الْهَرْجِ كَهِجْرَةٍ إِلَىَّ " .
also referenced under: Hadith 3985 (Reference) & Volume 5, Book 36, Hadith 3985 (DarusSalam)