Abu Idris al-Khawlani (may Allah have mercy on him) narrates it from the Prophet (peace and blessings be upon him) as a marfu' report, that he (peace and blessings be upon him) said: "Emigration (hijrah) (as a command) remains established and in force as long as fighting against the polytheists continues." All the narrators of this hadith's chain are thiqat (trustworthy) and reliable.
Hadith Referenceإتحاف الخيرة المهرة بزوائد المسانيد العشرة / كتاب الهجرة / 4257