Sayyiduna Ibn Abbas (may Allah be pleased with them both) says that it was said to Sayyiduna Safwan bin Umayyah (may Allah be pleased with him), while he was in the upper part of Makkah, that whoever does not emigrate has no religion. He said: I will not enter my house until I go to Madinah. He says: So he came to Madinah and stayed with Sayyiduna al-Abbas bin Abd al-Muttalib (may Allah be pleased with him). Then he came to the Messenger of Allah (peace and blessings be upon him), who said: "O Abu Wahb! What has brought you?" He said: I have heard that whoever has not emigrated has no religion. So the Prophet (peace and blessings be upon him) said: "O Abu Wahb! Go back to the valleys (Batha) of Makkah and settle down in your homes, for emigration has come to an end, but jihad and intention remain; and when you are called out (for jihad and the like), do not delay." (Apart from the story.)
Hadith Referenceالسنن الكبرى للبيهقي / كتاب السير / 17771