During viral infection, cells can deploy immune strategies that deprive viruses of molecules essential for their replication. In this study, we report a family of immune effectors in bacteria which, in response to phage infection, degrade cellular ATP and dATP by cleaving the N-glycosidic bond between the adenine and sugar moieties. These ATP nucleosidase effectors are widely distributed within multiple bacterial defense systems including CBASS, prokaryotic argonautes and NLR-like proteins, and we show that degradation of (d)ATP during infection halts phage propagation and aborts infection. By analyzing homologs of the immune ATP nucleosidase domain, we discover and characterize Detocs, a new family of bacterial defense systems with a two-component phosphotransfer signaling architecture. The immune ATP nucleosidase domain is also encoded within a diverse set of eukaryotic proteins that have immune-like architectures, and we show biochemically that these eukaryotic homologs preserve the ATP nucleosidase activity. Our findings suggest that ATP and dATP degradation is a cell-autonomous innate immune strategy conserved across the tree of life.