Defection

Defection is when a person leaves their home country in a way the home country claims to be illegal. To the first country, they can be seen as traitors.
It is a political label used by authoritarian countries.
More broadly, it involves abandoning a person, cause, or doctrine to which one is bound by some tie. The tie may be one of allegiance or of duty.
An example of this today are North Koreans who escape the country to live in a new country, such as South Korea or the United States. The North Korean government makes leaving the country without permission illegal, and punishments for this are extremely harsh. Escapees who are caught usually get sent to a prison camp or are publicly put to death. There have been around 33,000 defectors from North Korea since the North Korean famine.