The role that vitamin D plays in pulmonary function remains uncertain. Epidemiological studies reported mixed findings for the association of serum 25-hydroxyvitamin D [25(OH)D] and pulmonary function. We conducted the largest cross-sectional meta-analysis of the 25(OH)D-pulmonary function association to date, based on nine European ancestry (EA) cohorts (n=22,838) and five African ancestry (AA) cohorts (n=4,290) in the CHARGE Consortium. Data were analyzed using linear models by cohort and ancestry. Effect modification by smoking status (current/former/never) was tested. Results were combined using fixed-effects meta-analysis. Mean (SD) serum 25(OH)D was 68 (29) nmol/L for EAs and 49 (21) nmol/L for AAs. For each 1 nmol/L higher 25(OH)D, forced expiratory volume in the first second (FEV1) was higher by 1.1 mL in EAs (95% CI: 0.9,1.3; P=2.5×10-21) and 1.8 mL (95% CI: 1.1,2.5; P=1.6×10-7) in AAs (Prace difference=0.06), and forced vital capacity (FVC) was higher by 1.3 mL in EAs (95% CI: 1.0,1.6; P=1.1×10-20) and 1.5 mL (95% CI: 0.8,2.3; P=1.2×10-4) in AAs (Prace difference=0.56). Among EAs, the 25(OH)D-FVC association was stronger in smokers: per 1nmol/L higher 25(OH)D, FVC was higher by 1.7 mL (95% CI: 1.1,2.3) for current smokers and 1.7 mL (95% CI: 1.2,2.1) for former smokers, compared to 0.8 mL (95% CI: 0.4,1.2) for never smokers. In summary, the 25(OH)D associations with FEV1 and FVC were positive in both ancestries. In EAs, a stronger association was observed for smokers compared to never smokers, which supports the importance of vitamin D in vulnerable populations.