Objective To evaluate the diet quality of pregnant women in Shaanxi Province by Diet Balance Index for Pregnancy (DBI_P) and investigate the influencing factors. Methods By using a multi-stage stratified random sampling method, 7375 pregnant women in 30 districts (counties) of Shaanxi Province were recruited. A structured questionnaire was adopted to collect general information in pregnancy, and a semi-quantitative food frequency questionnaire was used to obtain dietary information in pregnancy. DBI_ P was used to evaluate the diet quality during pregnancy, and the factors influencing diet quality were assessed by multiple linear regression. Results More than 50% pregnant women had inadequate intakes of dairy products, fish and shrimp, meat and poultry, vegetables, eggs, fruits and diet variety. More than 69% pregnant women had excessive intakes of cooking oil, cereals and salt. The average values of high bound score, low bound score, and diet quality distance were 12.9, 19.5, and 32.5, respectively. The proportions of medium inadequate, excessive, and imbalance of dietary intakes were 20.3%, 22.55%, and 40.8%, respectively. DBI_LBS during pregnancy was negatively correlated with childbearing age, education level, family per capita annual income, antenatal examination frequency and folic acid supplementation, but positively correlated with living in southern and northern Shaanxi, residing in rural areas, being farmers, and drinking alcohol. DBI_HBS during pregnancy was negatively correlated with living in southern and northern Shaanxi, but positively correlated with active/passive smoking and drinking strong tea. DBI_DQD during pregnancy was negatively correlated with education level, family per capita annual income, antenatal examination frequency and folic acid supplementation, but positively correlated with living in southern Shaanxi, residing in rural areas, being farmers, parity, active/passive smoking, and drinking strong tea and coffee. Conclusion The dietary intake of pregnant women in Shaanxi Province was insufficient and unbalanced, and the dietary quality was affected by sociodemographic and life behavior factors during pregnancy. Nutritional intervention measures should be targeted. [ABSTRACT FROM AUTHOR]