Objective To investigate the effects of allicin on periodontal tissues in rats with type 2 diabetes mellitus (T2DM) and periodontitis. Methods Forty male SD rats were randomly divided into four groups (A-D), with 10 rats in each group. Group A was the healthy control group, with normal feeding and intragastric administration of normal saline. Group B was the diabetes periodontitis model group, with intragastric administration of normal saline. Groups C and D were diabetes periodontitis model groups treated with 30 and 60 mg/kg allicin, respectively, via intragastric administration. The rats were treated once daily for 4 weeks. During this period, the general condition of the rats was observed, and their fasting blood glucose levels were tracked. Before execution,the gingival index (GI), sulcus bleeding index (SBI), and probing depth (PD) were recorded. Enzyme-linked immunosorbent assay (ELISA) was used to detect the levels of tumor necrosis factor (TNF)-α, interleukin (IL)-6, lactate dehydrogenase (LDH) in rat serum, and malondialdehyde (MDA) in periodontal tissue. Micro-CT scanning was used to assess the periodontal condition, and the distance from the amelocemental junction (CEJ) to the alveolar bone crest (ABC) (CEJ-ABC) was recorded. Periodontal tissue sections were stained with hematoxylin and eosin (HE) to observe pathological changes in periodontal tissue. Results In Group B, the levels of blood glucose, GI, SBI, PD, serum TNF-α, IL-6, LDH, MDA in periodontal tissues, CEJ-ABC, and inflammatory status shown by HE staining were all significantly higher than those in Group A (P< 0.05). The above indicators in Groups C and D were significantly lower than those in Group B, and Group D was significantly lower than Group C (P< 0.05). Conclusion Allicin can inhibit the progression of periodontitis in rats with type 2 diabetes by reducing blood glucose levels, levels of inflammation factors, and decreasing alveolar bone resorption.