To investigate the separate and joint association between snoring and total sleep duration with the risk of type 2 diabetes mellitus (T2DM) in both genders within Chinese rural community. The Henan Rural Cohort Study included a total of 28093 participants. Data on snoring and total sleep duration were obtained through the Pittsburgh Sleep Quality Index (PSQI). Binary logistic regression was employed to assess the correlation between snoring and total sleep duration with T2DM. The prevalences of T2DM were 8.53% in males and 9.27% in females. Males exhibited a higher prevalence of snoring (34.90%) compared to females (22.42%), and the median of total sleep duration was also longer in males (8.83h) than in females (8.67h), respectively (P < 0.001). Females who snored had an adjusted odds ratio (OR) and 95% confidence interval (CI) for T2DM of 1.19 (1.06, 1.35) when contrasted with non-snorers. Compared with optimal total sleep duration (6-8h), longer total sleep duration (≥ 8h) increased the prevalence of T2DM by 17% (95%CI: 3%, 32%) in females. Additionally, the participants with shorter total sleep duration (< 6h) and snoring have the highest risk of T2DM, with an increase of 91% (95%CI: 20%, 204%) than those with optimal total sleep duration and non-snorers in females. These significant associations were not found in males. Snoring and longer total sleep duration independently elevated the prevalence of T2DM. Meantime, a synergistic relationship was observed between snoring and total sleep duration with a higher prevalence of T2DM. These associations exhibited gender-specific differences.