Ambient air pollution increases the risk of respiratory mortality, but evidence for impacts on lung function and chronic obstructive pulmonary disease (COPD) is less well established. The aim was to evaluate whether ambient air pollution is associated with lung function and COPD, and explore potential vulnerability factors. We used UK Biobank data on 303 887 individuals aged 40–69 years, with complete covariate data and valid lung function measures. Cross-sectional analyses examined associations of land use regression-based estimates of particulate matter (particles with a 50% cut-off aerodynamic diameter of 2.5 and 10 µm: PM 2.5 and PM 10 , respectively; and coarse particles with diameter between 2.5 μm and 10 μm: PM coarse ) and nitrogen dioxide (NO 2 ) concentrations with forced expiratory volume in 1 s (FEV 1 ), forced vital capacity (FVC), the FEV 1 /FVC ratio and COPD (FEV 1 /FVC <lower limit of normal). Effect modification was investigated for sex, age, obesity, smoking status, household income, asthma status and occupations previously linked to COPD. Higher exposures to each pollutant were significantly associated with lower lung function. A 5 µg·m −3 increase in PM 2.5 concentration was associated with lower FEV 1 (−83.13 mL, 95% CI −92.50– −73.75 mL) and FVC (−62.62 mL, 95% CI −73.91– −51.32 mL). COPD prevalence was associated with higher concentrations of PM 2.5 (OR 1.52, 95% CI 1.42–1.62, per 5 µg·m −3 ), PM 10 (OR 1.08, 95% CI 1.00–1.16, per 5 µg·m −3 ) and NO 2 (OR 1.12, 95% CI 1.10–1.14, per 10 µg·m −3 ), but not with PM coarse . Stronger lung function associations were seen for males, individuals from lower income households, and “at-risk” occupations, and higher COPD associations were seen for obese, lower income, and non-asthmatic participants. Ambient air pollution was associated with lower lung function and increased COPD prevalence in this large study.