Caution: Translations of Quran and Ḥadīth may lead to possible misapplications and misinterpretations. This site is intended for students of sacred knowledge that are proficient in comprehending classical Arabic and have a strong foundation in Islamic sciences. Also note that religious injunctions rely on several aspects beyond what one may glean through reading individual aḥādīth.
muslim:2948aYaḥyá b. Yaḥyá > Ḥammād b. Zayd > Muʿallá b. Ziyād > Muʿāwiyah b. Qurrah > Maʿqil b. Yasār

Worshiping during the period of widespread turmoil is like emigration towards me.  

مسلم:٢٩٤٨aحَدَّثَنَا يَحْيَى بْنُ يَحْيَى أَخْبَرَنَا حَمَّادُ بْنُ زَيْدٍ عَنْ مُعَلَّى بْنِ زِيَادٍ عَنْ مُعَاوِيَةَ بْنِ قُرَّةَ عَنْ مَعْقِلِ بْنِ يَسَارٍ

أَنَّ رَسُولَ اللَّهِ ﷺ ح وَحَدَّثَنَاهُ قُتَيْبَةُ بْنُ سَعِيدٍ حَدَّثَنَا حَمَّادٌ عَنِ الْمُعَلَّى بْنِ زِيَادٍ رَدَّهُ إِلَى مُعَاوِيَةَ بْنِ قُرَّةَ رَدَّهُ إِلَى مَعْقِلِ بْنِ يَسَارٍ رَدَّهُ إِلَى النَّبِيِّ ﷺ قَالَ الْعِبَادَةُ فِي الْهَرْجِ كَهِجْرَةٍ إِلَىَّ  


See similar narrations below:

Collected by Tirmidhī
tirmidhi:2201Qutaybah > Ḥammād b. Zayd

"Worship during Al-Harj is like Hijrah to me."  

الترمذي:٢٢٠١حَدَّثَنَا قُتَيْبَةُ حَدَّثَنَا حَمَّادُ بْنُ زَيْدٍ

عَنِ الْمُعَلَّى بْنِ زِيَادٍ رَدَّهُ إِلَى مُعَاوِيَةَ بْنِ قُرَّةَ رَدَّهُ إِلَى مَعْقِلِ بْنِ يَسَارٍ رَدَّهُ إِلَى النَّبِيِّ ﷺ قَالَ الْعِبَادَةُ فِي الْهَرْجِ كَالْهِجْرَةِ إِلَىَّ  

قَالَ أَبُو عِيسَى هَذَا حَدِيثٌ صَحِيحٌ غَرِيبٌ إِنَّمَا نَعْرِفُهُ مِنْ حَدِيثِ حَمَّادِ بْنِ زَيْدٍ عَنِ الْمُعَلَّى