The polarization of macrophages plays a critical role in the immune response to infectious diseases, with M2 polarization shown to be particularly important in various pathological processes. However, the specific mechanisms of M2 macrophage polarization in Mycobacterium tuberculosis (Mtb) infection remain unclear. In particular, the roles of Granulin (GRN) and tumor necrosis factor receptor 2 (TNFR2) in the M2 polarization process have not been thoroughly studied. To investigate the effect of macrophage M2 polarization on Mtb infection and the mechanism of GRN and TNFR2 in M2 polarization. Forty patients with pulmonary tuberculosis (PTB) and 40 healthy volunteers were enrolled in this study, and peripheral blood samples were taken to detect the levels of TNFR2 and GRN mRNA by Quantitative Reverse Transcription Polymerase Chain Reaction (RT-qPCR); monocytes were isolated and then assessed by Flow Cytometry (FC) for M1 and M2 macrophage levels. To further validate the function of TNFR2 in macrophage polarization, we used interleukin 4 (IL-4) to induce mouse monocyte macrophages RAW264.7 to M2 polarized state. The expression of TNFR2 was detected by Western Blot and RT-qPCR. Next, we constructed a GRN knockdown plasmid and transfected it into IL-4-induced mouse monocyte macrophage RAW264.7, and detected the expression of TNFR2, M1 macrophage-associated factors tumor necrosis factor-α (TNF-α), inducible nitric oxide synthase (iNOS), and interleukin 6 (IL-6), and the M2 macrophage-associated factors CD206, IL-10, and Arginase 1 (Arg1); Immunofluorescence staining was used to monitor the expression of CD86+ and CD206+, and FC was used to analyze the macrophage phenotype. Subsequently, immunoprecipitation was used to detect the binding role of GRN and TNFR2. Finally, the effects of GRN and TNFR2 in macrophage polarization were further explored by knocking down GRN and simultaneously overexpressing TNFR2 and observing the macrophage polarization status. The results of the study showed elevated expression of TNFR2 and GRN and predominance of M2 type in macrophages in PTB patients compared to healthy volunteers (p < 0.05). Moreover, TNFR2 was highly expressed in M2 macrophages (p < 0.05). Additionally, GRN knockdown was followed by elevated expression of M1 polarization markers TNF-α, iNOS and IL-6 (p < 0.05), decreased levels of M2 polarization-associated factors CD206, IL-10 and Arg1 (p < 0.05), and macrophage polarization towards M1. Subsequently, we found that GRN binds to TNFR2 and that GRN upregulates TNFR2 expression (p < 0.05). In addition, knockdown of GRN elevated M1 polarization marker expression, decreased M2 polarization marker expression, and increased M1 macrophages and decreased M2 macrophages, whereas concurrent overexpression of TNFR2 decreased M1 polarization marker expression, elevated M2 polarization marker expression, and decreased M1 macrophages and increased M2 macrophages. TNFR2 and GRN are highly expressed in PTB patients and GRN promotes macrophage M2 polarization by upregulating TNFR2 expression.