Tuberculosis is the leading cause of death by an infectious disease worldwide1. However, the involvement of innate lymphoid cells (ILCs) in immune responses to infection with Mycobacterium tuberculosis (Mtb) is unknown. Here we show that circulating subsets of ILCs are depleted from the blood of participants with pulmonary tuberculosis and restored upon treatment. Tuberculosis increased accumulation of ILC subsets in the human lung, coinciding with a robust transcriptional response to infection, including a role in orchestrating the recruitment of immune subsets. Using mouse models, we show that group 3 ILCs (ILC3s) accumulated rapidly in Mtb-infected lungs and coincided with the accumulation of alveolar macrophages. Notably, mice that lacked ILC3s exhibited a reduction in the accumulation of early alveolar macrophages and decreased Mtb control. We show that the C-X-C motif chemokine receptor 5 (CXCR5)-C-X-C motif chemokine ligand 13 (CXCL13) axis is involved in Mtb control, as infection upregulates CXCR5 on circulating ILC3s and increases plasma levels of its ligand, CXCL13, in humans. Moreover, interleukin-23-dependent expansion of ILC3s in mice and production of interleukin-17 and interleukin-22 were found to be critical inducers of lung CXCL13, early innate immunity and the formation of protective lymphoid follicles within granulomas. Thus, we demonstrate an early protective role for ILC3s in immunity to Mtb infection.