Qualities of a Muslim
Abdullah bin Amr bin Al-as (radi Allahu anhum) reported that the Prophet (sal Allahu alaihi wa sallam) said, “A Muslim is the one from whose tongue and hands the Muslims are safe; and a Muhajir (Emigrant) is the one who refrains from what Allah has forbidden.”
[Sahih al-Bukhari and Muslim]
The Hadith shows that a true Muslim is one who does not do any harm to others, overtly or covertly.
Similarly, the true Muhajir is one who avoids disobeying Allah. Thus, if a person leaves his home to emigrate to some other place but does not save himself from sins, his emigration is of no avail.
And Allah Knows Best!