Combined deficiencies of nutrients such as iron and folic acid intake during pregnancy are related to nutritional deficiencies risk, such as anemia. The objective of this study was to analyze the association between risk factors (sociodemographic, dietary and lifestyle) and the intake of iron and folate by pregnant women followed up in Primary Health Care (PHC) in the Federal District, Brazil. A cross-sectional observational study was carried out with adult pregnant women of different gestational ages. A semi-structured questionnaire was applied by researchers trained to collect sociodemographic, economic, environmental, and health data. Two nonconsecutive 24-hour recalls (24hr) were carried out to collect data about food consumption. Multivariate linear regression models were used to analyze the association between sociodemographic and dietary risk factors and the consumption of iron and folate. The mean daily energy intake was 1726 kcal (95% CI 1641–1811), with 22.4% (95% CI 20.09–24.66) derived from ultra-processed foods (UPFs). The mean iron and folate intake were 5.28 mg (95% CI 5.09–5.48) and 193.42 µg (95% CI 182.22–204.61), respectively. According to the multivariate model, the highest quintile of ultra-processed foods intake was associated with lower iron (β = −1.15; IC 95%: −1.74; 0.55;p< 0.001) and folate intake (β = −63.23; IC 95%: −98.32; −28.15;p< 0.001). Pregnant women with high school degree presented higher iron intake (β = 0.74; IC 95%: 0.20; 1.28;p= 0.007) and folate intake (β = 38.95; IC 95%: 6.96; 70.95;p= 0.017) compared to pregnant women with elementary school degree. Folate consumption was also associated with the second gestational period (β = 39.44; IC 95%: 5.58; 73.30;p= 0.023) and pregnancy planning (β = 26.88; IC 95%: 3.58; 50.18;p= 0.024). Further research is warranted to enhance evidence on the relationship between the role of processed foods and micronutrients intake to strengthen the nutritional quality of diet of pregnant women attended in Primary Health Care.