Defection is defined as deserting your country or cause.
(verb)When you are supposed to be in the army serving your country and you flipflop sides and start working for the other side, this is an example of defection.
See defection in Webster's New World College Dictionary
noun
Origin: L defectio < defectus: see defect
Learn more about defection