To investigate the effects of anxiety and depression on gestational diabetes mellitus(GDM) in early pregnancy. A prospective study was conducted in 2017 to select 1426 single-child healthy pregnant women of 8-14 weeks from the Sichuan Provincial Hospital for Women and Children through a deliberate sampling method. The age was(28. 6±4. 0) years old. Basic information such as age, pre-pregnancy weight, parity, and gravidity of pregnant women was collected through questionnaire survey. The anxiety self-rating scale(SAS) and depression self-rating scale(SDS) were used to collect information of anxiety and depression in pregnant women, and their anxiety and depressive symptoms were evaluated according to the result of Chinese norm. At 24 to 28 weeks of gestation, the oral glucose tolerance test(OGTT) was conducted. GDM was diagnosed according to the Guidelines for the Diagnosis and Treatment of Pregnancy Diabetes in China(2014). Multivariate unconditional Logistic regression was adopted to analyze the effects of anxiety and depression on GDM in pregnant women. The incidence of GDM in early pregnancy anxiety group and depression group was 41. 8% and 33. 6%, respectively. The incidence of anxiety, depression, and anxiety combined with depression were 7. 7%, 10. 5% and 4. 8%, respectively. The incidence of anxiety and depression in the group of pregnant women younger than 30 years old(9. 0% and 11. 7%) was higher than that in the group of pregnant women older than 30 years old(5. 3% and 8. 1%). The prevalence of anxiety and depression in the group of nulliparous women(8. 8% and 11. 9%) was higher than that in the group of multiparous women(5. 4% and 6. 4%). The difference was statistically significant(P<0. 05). After adjusting the confounding factors such as age, pre-pregnancy body mass index, family history of diabetes, gravidity, parity, energy intake, conception, education, occupation, smoking and drinking, the result showed that the risk of GDM in anxious pregnant women was increased, compared with that in non-anxious pregnant women in early pregnancy(OR=1. 556, 95% CI 1. 014-2. 387). However, the association between early pregnancy depression and the occurrence of GDM was not found(P>0. 05). Compared with the non-anxiety group in the early pregnancy, the risk of GDM in the anxiety group was increased both in pregnant women under 30 years old(OR=1. 654, 95% CI 1. 004-2. 726) and nulliparous women(OR=1. 633, 95% CI 1. 013-2. 634). No correlation between anxiety and risk of GDM was observed in pregnant women over 30 years old and multiparous women(P>0. 05). Anxiety in early pregnancy increases the risk of GDM. Pregnant women under 30 years old and and nulliparous women are at high risk of anxiety.