Objective To explore the imbalance of Th1/Th2 cell-mediated immunity and the changes in macrophage M1-M2 polarization in patients with type 2 diabetes mellitus (T2DM) complicated with chronic periodontitis (CP) and their relationship with the degree of periodontal lesions and treatment prognosis. Methods Eighty patients with T2DM and CP who were treated at Department of Stomatology, Baoji People's Hospital from January 2022 to June 2023 were enrolled in this prospective study. Based on the severity of CP, the patients were divided into a mild group (57 cases) and a moderate-severe group (23 cases). According to the prognosis after the treatment, they were divided into a good prognosis group (33 cases) and a poor prognosis group (47 cases). There were 28 males and 29 females in the mild group; they were (48.00±6.03) years old; their T2DM duration was (3.54±1.15) years; their CP duration was (12.54±4.65) months. There were 11 males and 12 females in the moderate-severe group; they were (50.48±6.65) years old; their T2DM duration was (3.79±1.55) years; their CP duration was (12.71±4.76) months. The flow cytometry was used to assess the ratio of Th1/Th2 cells. The real-time quantitative PCR was employed to analyze the expression of M1 and M2 macrophage markers in periodontal tissue. The Pearson correlation analysis was performed to evaluate the correlations of Th1/Th2 ratio and M1/M2 polarization with the clinical parameters of periodontitis and prognosis. t and χ2 tests were used. Results The proportion of Th1 cells, Th1/Th2, and levels of tumor necrosis factor (TNF) -α, interleukin (IL) -2, IL-4, IL-6, IL-10, IL-1β, IL-12, IL-17, TNF-β, inducible nitric oxide synthase (iNOS), signal transducer and activator of transcription 6 (STAT6) mRNA, and arginase 1 (Arg1) mRNA in the moderate-severe group were higher than those in the mild group [(2.62±0.53)% vs. (1.62±0.41)%, (2.47±0.53) vs. (1.21±0.27), (51.83±6.25) ng/L vs. (36.74±5.47) ng/L, (27.54±50.00) μg/L vs. (14.58±4.65) μg/L, (72.63±8.95) ng/L vs. (46.68±6.57) ng/L, (41.85±2.61) ng/L vs. (37.08±3.54) ng/L, (4.76±1.13) ng/L vs. (3.87±1.16) ng/L, (23.10±5.86) μg/L vs. (16.78±2.54) μg/L, (11.76±5.37) ng/L vs. (9.16±2.16) ng/L, (12.78±2.14) μg/L vs. (10.54±1.63) μg/L, (1 370.0±160.0) μg/L vs. (910.0±140.0) μg/L, (800.0±180.0) μg/L vs. (260.0±110.0) μg/L, (930.0±190.0) μg/L vs. (430.0±110.0) μg/L, (760.0±130.0) μg/L vs. (560.0±90.0) μg/L, and (710.0±120.0) μg/L vs. (490.0±80.0) μg/L]; the proportion of Th2 cells and the levels of interferon γ (IFN-γ) and IL-23 in the in the moderate-severe group were lower than those in the mild group [(1.06±0.37)% vs. (1.34±0.41)%, (4.21±0.65)ng/L vs. (4.85±0.67)ng/L, and (6.84±0.83) ng/L vs. (14.65±1.81) ng/L]; there were statistical differences (t=9.05, 14.06, 10.71, 10.69, 14.35, 5.84, 3.12, 6.76, 3.10, 5.07, 12.76, 16.37, 14.73, 7.87, 9.57, 2.84, 3.95, and 19.81; all P<0.05). The severity of CP positively correlated with Th1, Th1/Th2, TNF-α, IL-2, IL-4, IL-6, IL-10, IL-1β, IL-12, IL-17, IL-23, TNF-β, STAT1, iNOS, STAT6 mRNA, and Arg1 mRNA (all P<0.01), and negatively with Th2, INF-γ, and IL-23 (all P<0.01). The proportion of Th1 cells, Th1/Th2, and levels of TNF-α and IL-1β in the good prognosis group were lower than those in the poor prognosis group [(1.31±0.21)% vs. (2.62±0.75)%, (0.94±0.21) vs. (2.70±0.48), (34.81±4.51) ng/L vs. (55.23±7.31) ng/L, (15.84±2.89) μg/L vs. (24.56±4.74) μg/L]; the proportion of Th2 cells in the good prognosis group was higher than that in the poor prognosis group [(1.39±0.24)% vs. (0.97±0.37)%]; there were statistical differences (t=9.75, 19.74, 14.24, 9.40, and 5.72; all P<0.05). Conclusion The imbalance of Th1/Th2 and changes in M1-M2 polarization status in patients with T2DM and CP are closely related to the degree of periodontal lesions and treatment prognosis, indicating that modulating immune responses may have potential clinical significance in improving periodontal lesions and prognosis of patients with T2DM.