Several studies have shown that active smoking is a risk factor for type 2 diabetes mellitus (T2DM). However, the effects of passive smoking on T2DM remains unknown. In this study, we investigated the effects of passive smoking and its duration on the prevalence of prediabetes and T2DM. According to passive smoking status, participants were divided into Group A (passive smokers) and Group B (controls). Furthermore, Group A was divided into three subgroups according to the duration of passive smoking: Group A1 (≤10 years), Group A2 (10–20 years), and Group A3 (>20 years). We found that the prevalence of impaired glucose tolerance (IGT) in Group A (26.6%), Group A2 (28%), and Group A3 (37.8%) was significantly higher than that in Group B (19.6%), and the prevalence gradually increased with an increase in the duration of passive smoking. Multiple logistic regression analysis showed that passive smoking for >10 years was a risk factor for impaired fasting glucose (IFG), IGT, and T2DM. Therefore, passive smoking not only increases the prevalence of IGT in a time-dependent manner, but also a risk factor for IFG, IGT, and T2DM when its duration is over 10 years.