T cell immunity is essential for the control of tuberculosis (TB), an important disease of the lung, and is generally studied in humans using peripheral blood cells. Mounting evidence, however, indicates that tissue-resident memory T cells (Trms) are superior at controlling many pathogens, including Mycobacterium tuberculosis (M. tuberculosis), and can be quite different from those in circulation. Using freshly resected lung tissue, from individuals with active or previous TB, we identified distinct CD4+and CD8+ Trm-like clusters within TB-diseased lung tissue that were functional and enriched for IL-17–producing cells. M. tuberculosis–specific CD4+ T cells producing TNF-α, IL-2, and IL-17 were highly expanded in the lung compared with matched blood samples, in which IL-17+ cells were largely absent. Strikingly, the frequency of M. tuberculosis–specific lung T cells making IL-17, but not other cytokines, inversely correlated with the plasma IL-1β levels, suggesting a potential link with disease severity. Using a human granuloma model, we showed the addition of either exogenous IL-17 or IL-2 enhanced immune control of M. tuberculosis and was associated with increased NO production. Taken together, these data support an important role for M. tuberculosis–specific Trm-like, IL-17–producing cells in the immune control of M. tuberculosis in the human lung.