All perfect praise be to Allaah, the Lord of the worlds. I testify that there is none worthy of worship except Allaah, and that Muhammad, sallallaahu ‘alayhi wa sallam, is His Slave and Messenger.
We have no knowledge of the specific wording of the Hadeeth you have mentioned. However, there is another wording related to emigration, and it is mentioned in Sunan An-Nasaa’i and Musnad Ahmad: Ya‘la ibn Umayyah brought his father Umayyah to the Prophet, sallallaahu ‘alayhi wa sallam, on the day of the Conquest of Makkah and requested that he, sallallaahu ‘alayhi wa sallam, accept his father’s pledge to perform Hijrah. Instead, the Prophet, sallallaahu ‘alayhi wa sallam, told him that he would take his pledge for Jihaad, as Hijrah had ceased.
This Hadeeth means that Hijrah from Makkah ceased for it become a Muslim state soon after the Conquest. The same meaning is stated in another narration in Al-Bukhari on the authority of ‘Aa’ishah .
However, on the other hand, Hijrah from a country of disbelief to a Muslim country, and from a place where a wrongdoing is committed while it is impossible to effect change, or if one is likely to commit sins, is a continuing obligation.
Allaah Knows best.