A striking difference between genital and ocular clinical isolates of Chlamydia trachomatis is that only the former express a functional tryptophan synthase and therefore can synthesize tryptophan by indole salvage. Ocular isolates uniformly cannot use indole due to inactivating mutations within tryptophan synthase, indicating a selection against maintaining this enzyme in the ocular environment. Here, we demonstrate that this selection occurs in two steps. First, specific indole derivatives, produced by the human gut microbiome and present in serum, rapidly induce expression of C. trachomatis tryptophan synthase, even under conditions of tryptophan sufficiency. We demonstrate that these indole derivatives function by acting as de-repressors of C. trachomatis TrpR. Second, trp operon de-repression is profoundly deleterious when infected cells are in an indole-deficient environment, because in the absence of indole, tryptophan synthase deaminates serine to pyruvate and ammonia. We have used biochemical and genetic approaches to demonstrate that expression of wild-type tryptophan synthase is required for the bactericidal production of ammonia. Pertinently, although these indole derivatives de-repress the trpRBA operon of C. trachomatis strains with trpA or trpB mutations, no ammonia is produced, and no deleterious effects are observed. Our studies demonstrate that tryptophan synthase can catalyze the ammonia-generating β-elimination reaction within any live bacterium. Our results also likely explain previous observations demonstrating that the same indole derivatives inhibit the growth of other pathogenic bacterial species, and why high serum levels of these indole derivatives are favorable for the prognosis of diseased conditions associated with bacterial dysbiosis.