Candidate antibacterials are usually identified on the basis of their in vitro activity. However, the apparent inhibitory activity of new leads can be misleading because most culture media do not reproduce an environment relevant to infection in vivo. In this study, while screening for novel anti-tuberculars, we uncovered how carbon metabolism can affect antimicrobial activity. Novel pyrimidine-imidazoles (PIs) were identified in a whole-cell screen against Mycobacterium tuberculosis. Lead optimization generated in vitro potent derivatives with desirable pharmacokinetic properties, yet without in vivo efficacy. Mechanism of action studies linked the PI activity to glycerol metabolism, which is not relevant for M. tuberculosis during infection. PIs induced self-poisoning of M. tuberculosis by promoting the accumulation of glycerol phosphate and rapid ATP depletion. This study underlines the importance of understanding central bacterial metabolism in vivo and of developing predictive in vitro culture conditions as a prerequisite for the rational discovery of new antibiotics.