Previous studies have suggested that exposure to air pollutants may be associated with specific blood indicators or anemia in certain populations. However, there is insufficient epidemiological data and prospective evidence to evaluate the relationship between environmental air pollution and specific types of anemia. We conducted a large-scale prospective cohort study based on the UK Biobank. Annual average concentrations of NO2, PM2.5, PM2.5-10, and PM10 were obtained from the ESCAPE study using the Land Use Regression (LUR) model. The association between atmospheric pollutants and different types of anemia was investigated using the Cox proportional hazards model. Furthermore, restricted cubic splines were used to explore exposure-response relationships for positive associations, followed by stratification and effect modification analyses by gender and age. After adjusting for demographic characteristics, 3-4 of the four types of air pollution were significantly associated with an increased risk of iron deficiency, vitamin B12 deficiency and folate deficiency anemia, while there was no significant association with other defined types of anemia. After full adjustment, we estimated that the hazard ratios (HRs) of iron deficiency anemia associated with each 10 μg/m3 increase in NO2, PM2.5, and PM10 were 1.04 (95%CI: 1.02, 1.07), 2.00 (95%CI: 1.71, 2.33), and 1.10 (95%CI: 1.02, 1.20) respectively. The HRs of folate deficiency anemia with each 10 μg/m3 increase in NO2, PM2.5, PM2.5-10, and PM10 were 1.25 (95%CI: 1.12, 1.40), 4.61 (95%CI: 2.03, 10.47), 2.81 (95%CI: 1.11, 7.08), and 1.99 (95%CI: 1.25, 3.15) respectively. For vitamin B12 deficiency anemia, no significant association with atmospheric pollution was found. Additionally, we estimated almost linear exposure-response curves between air pollution and anemia, and interaction analyses suggested that gender and age did not modify the association between air pollution and anemia. Our research provided reliable evidence for the association between long-term exposure to PM10, PM2.5, PM2.5-10, NO2, and several types of anemia. NO2, PM2.5, and PM10 significantly increased the risk of iron deficiency anemia and folate deficiency anemia. Additionally, we found that the smaller the PM diameter, the higher the risk, and folate deficiency anemia was more susceptible to air pollution than iron deficiency anemia. No association was observed between the four types of air pollution and hemolytic anemia, aplastic anemia, and other types of anemia. Although the mechanisms are not well understood, we emphasize the need to limit the levels of PM and NO2 in the environment to reduce the potential impact of air pollution on folate and iron deficiency anemia.