Mycobacterium tuberculosis infection leads to cytosolic release of the bacterial cyclic dinucleotide (CDN) c-di-AMP and a host-generated CDN, cGAMP, both of which trigger type I interferon (IFN) expression in a STING-dependent manner. Here we report that M. tuberculosis has developed a mechanism to inhibit STING activation and the type I IFN response via the bacterial phosphodiesterase (PDE) CdnP, which mediates hydrolysis of both bacterial-derived c-di-AMP and host-derived cGAMP. Mutation of cdnP attenuates M. tuberculosis virulence, as does loss of a host CDN PDE known as ENPP1. CdnP is inhibited by both US Food and Drug Administration (FDA)-approved PDE inhibitors and nonhydrolyzable dinucleotide mimetics specifically designed to target the enzyme. These findings reveal a crucial role of CDN homeostasis in governing the outcome of M. tuberculosis infection as well as a unique mechanism of subversion of the host's cytosolic surveillance pathway (CSP) by a bacterial PDE that may serve as an attractive antimicrobial target.