Cells are perpetually challenged by pathogens, protein aggregates or chemicals, that induce plasma membrane or endolysosomal compartments damage. This severe stress is recognised and controlled by the endosomal sorting complex required for transport (ESCRT) and the autophagy machineries, which are recruited to damaged membranes to either repair or to remove membrane remnants. Yet, insight is limited about how damage is sensed and which effectors lead to extensive tagging of the damaged organelles with signals, such as K63-polyubiquitin, required for the recruitment of membrane repair or removal machineries. To explore the key factors responsible for detection and marking of damaged compartments, we use the professional phagocyteDictyostelium discoideum. We found an evolutionary conserved E3-ligase, TrafE, that is robustly recruited to intracellular compartments disrupted after infection withMycobacterium marinumor after sterile damage caused by chemical compounds. TrafE acts at the intersection of ESCRT and autophagy pathways and plays a key role in functional recruitment of the ESCRT subunits ALIX, Vps32 and Vps4 to damage sites. Importantly, we show that the absence of TrafE severely compromises the xenophagy restriction of mycobacteria as well as ESCRT-mediated and autophagy-mediated endolysosomal membrane damage repair, resulting in early cell death.