Mycobacterium tuberculosis (Mtb) induces necrosis of infected cells to evade immune responses. Recently, we found that Mtb utilizes the protein CpnT to kill human macrophages by secreting its C-terminal domain, named tuberculosis necrotizing toxin (TNT) that induces necrosis by an unknown mechanism. Here we show that TNT gains access to the cytosol of Mtb-infected macrophages, where it hydrolyzes the essential co-enzyme nicotinamide adenine dinucleotide (NAD+). Expression or injection of a non-catalytic TNT mutant showed no cytotoxicity in macrophages or zebrafish zygotes, respectively, demonstrating that the NAD+-glycohydrolase activity is required for TNT-induced cell death. To prevent self-poisoning, Mtb produces an immunity factor for TNT (IFT) that binds TNT and inhibits its activity. The crystal structure of the TNT-IFT complex revealed a novel NAD+-glycohydrolase fold of TNT, which constitutes the founding member of a toxin family wide-spread in pathogenic microorganisms.