Macrophages have a key role in shaping the tumour microenvironment (TME), tumour immunity and response to immunotherapy, which makes them an important target for cancer treatment1,2. However, modulating macrophages has proved extremely difficult, as we still lack a complete understanding of the molecular and functional diversity of the tumour macrophage compartment. Macrophages arise from two distinct lineages. Tissue-resident macrophages self-renew locally, independent of adult haematopoiesis3-5, whereas short-lived monocyte-derived macrophages arise from adult haematopoietic stem cells, and accumulate mostly in inflamed lesions1. How these macrophage lineages contribute to the TME and cancer progression remains unclear. To explore the diversity of the macrophage compartment in human non-small cell lung carcinoma (NSCLC) lesions, here we performed single-cell RNA sequencing of tumour-associated leukocytes. We identified distinct populations of macrophages that were enriched in human and mouse lung tumours. Using lineage tracing, we discovered that these macrophage populations differ in origin and have a distinct temporal and spatial distribution in the TME. Tissue-resident macrophages accumulate close to tumour cells early during tumour formation to promote epithelial-mesenchymal transition and invasiveness in tumour cells, and they also induce a potent regulatory T cell response that protects tumour cells from adaptive immunity. Depletion of tissue-resident macrophages reduced the numbers and altered the phenotype of regulatory T cells, promoted the accumulation of CD8+ T cells and reduced tumour invasiveness and growth. During tumour growth, tissue-resident macrophages became redistributed at the periphery of the TME, which becomes dominated by monocyte-derived macrophages in both mouse and human NSCLC. This study identifies the contribution of tissue-resident macrophages to early lung cancer and establishes them as a target for the prevention and treatment of early lung cancer lesions.