We show that metformin treatment (i) expands memory-like CD8+CXCR3+ T cells in naive mice and in healthy and diabetic humans, (ii) induces mitochondrial SRC and FAO in CD8+ T cells, and (iii) enhances Bacillus Calmette–Guérin (BCG) vaccine-elicited CD8+ T-cell responses and efficacy in mouse and guinea pig TB models. The gene discussed is CXCR3; the disease is tuberculosis.