SummaryZorya is a recently identified and widely distributed bacterial immune system, which protects against phage invasion. It consists of a predicted membrane-embedded complex (ZorAB) and soluble components that differ among Zorya subtypes, notably ZorC and ZorD, in type I Zorya systems. Here, we reveal the molecular basis of the Zorya defense system using cryo-electron microscopy, mutagenesis, fluorescence microscopy, proteomics, and functional studies. We demonstrate that ZorAB shares the stoichiometry of other 5:2 inner membrane ion-driven rotary motors. Additionally, ZorA5B2features a dimeric ZorB peptidoglycan binding domain and a pentameric α-helical coiled-coil tail made of ZorA that projects approximately 700 Å into the cytoplasm. We further characterize the structure and function of the soluble Zorya components, ZorC and ZorD, and find that they harbour DNA binding and nuclease activity, respectively. Comprehensive functional and mutational analyses demonstrates that all Zorya components work in concert to protect bacterial cells against invading phages. We present evidence that ZorAB operates as an ion-driven motor that becomes activated and anchors to the cell wall upon sensing of cell envelope perturbations during phage invasion. Subsequently, ZorAB transfers the phage invasion signal through the ZorA cytoplasmic tail to the soluble effectors, which function to prevent phage propagation. In summary, our study elucidates the foundational mechanisms of Zorya function and reveals a novel triggering signal for the rapid activation of an anti-phage defense system.