Beyond its role in intracellular degradation, autophagy is considered to play anti- and pro-microbial roles in host-microbe interactions, in both animals and plants. One of the prominent roles of anti-microbial autophagy in animals is to degrade intracellular pathogens or microbial molecules, in a process termed "xenophagy". Consequently, microbes evolved mechanisms to hijack or modulate autophagy to escape elimination. The role of xenophagy and its contribution in plant-bacteria interactions still remain unknown. Here, we provide evidence that NBR1/Joka2-dependent selective autophagy functions in plant defence by degrading the bacterial type-III effector (T3E) XopL from Xanthomonas campestris pv. vesicatoria (Xcv). We further describe how XopL associates with the autophagy machinery, undergoes self-ubiquitination and in planta ubiquitination triggering its degradation by the NBR1/Joka2 selective autophagy pathway. However, Xcv is also able to suppress autophagy in a T3E-dependent manner by utilizing the same T3E XopL that interacts and degrades the autophagy component SH3P2 via its E3 ligase activity. Through the degradation of SH3P2 and inhibition of autophagy, XopL is able to escape its own degradation to promote pathogenicity of Xcv. Together, we reveal a novel phenomenon how the NBR1/Joka2 contributes to anti-microbial autophagy that we termed "effectorphagy". We provide a unique mechanism how a T3E undergoes self-modification to act as a bait to trap host cellular degradation machineries.