ObjectiveTo analyze the effects of different dietary types on in type 2 diabetes mellitus (T2DM) and determine the mediating effects of Body Mass Index (BMI) on dietary type with Fasting Plasma Glucose (FPG), Glycosylated Hemoglobin (HbA1c) on the associations in T2DM.MethodsData of community-based cross-sectional study with 9602 participants including 3623 men and 5979 women were collected from the project ‘Comprehensive Research in prevention and Control of Diabetes mellitus (CRPCD)’ conducted by Jiangsu Center for Disease Control and Prevention in 2018. The dietary data were collected from a food frequency qualitative questionnaire (FFQ) and dietary patterns were derived through Latent Class Analysis (LCA). Then, Logistics regression analyses were used to evaluate the associations of FPG, HbA1c with different dietary patterns. The BMI (BMI = height/weight2) was used as a moderator to estimate the mediating effect. Mediation analysis was performed using hypothetical variables, the mediation variables, to identify and explain the observed mechanism of association between the independent and dependent variables while the moderation effect was tested with multiple regression analysis with interaction terms.ResultsAfter completing Latent Class Analysis (LCA), the dietary patterns were divided into three categories: TypeI, TypeII, TypeIII. After adjusting for confounding factors such as gender, age, education level, marital status, family income, smoking, drinking, disease course, HDL-C, LDL-C, TC, TG, oral hypoglycemic drugs, insulin therapy, Hypertension, Coronary heart disease, Stroke, Type III were all significantly associated with HbA1c compared to those with Type I (P < 0.05), and the research showed the patients with Type III had High glycemic control rate. Taking type I as the reference level, the 95% Bootstrap confidence intervals of the relative mediating effect of TypeIII on FPG were (-0.039, -0.005), except 0, indicating that the relative mediating effect was significant (αIII = 0.346*, βIIIFPG = -0.060*). The mediating effect analysis was performed to demonstrate that BMI was used as a moderator to estimate the moderation effect.ConclusionsOur findings demonstrate that consuming Type III dietary patterns associates with good glycemic control in T2DM and the BMI associations would be playing a two-way effect between diet and FPG in Chinese population with T2DM, indicated that Type III could not only directly affect FPG, but also affect FPG through the mediating effect of BMI.