Definitions of desert

to abandon (=to leave forever) a person, cause, or organization in a way considered disloyal (=not supporting someone or something when you should)

He arrived here a month ago after deserting his wife and four children.

to leave the armed forces illegally with no intention of returning

An Iraq veteran who deserted the US army saying the war was illegal is seeking asylum in Germany.