Abstract Background Endothelial dysfunction is an integrated index of risk factor burden and a marker of atherosclerotic cardiovascular disease. Air pollution is widely acknowledged as a significant non-traditional risk factor for cardiovascular disease. However, the impact of air pollutants at varying concentrations and exposure durations on endothelial function in different populations remains unclear. Purpose We aimed to use brachial artery flow-mediated dilatation (FMD) to identify demographic differences in the effects of short- and long-term exposure to air pollution on endothelial dysfunction. Methods We measured FMD in 850 participants from October 2016 to January 2020. Location-specific concentrations of fine particulate matter <2.5 μm aerodynamic diameter (PM2.5), inhalable particulate matter <10 μm aerodynamic diameter (PM10), sulfur dioxide (SO2), nitrogen dioxide (NO2), carbon monoxide (CO), and ozone (O3) measured by fixed ambient air monitoring stations were collected for short- and long-term exposure assessment. We used the moving average 7- and 14-day exposures before the date of FMD measurements to estimate the short-term exposure effects and the moving average 12-month exposures before the date of FMD measurements to estimate the long-term exposure effects. Multiple linear regression models and restricted cubic splines were used to assess the associations before and after stratified by age and sex. Results This study eventually included 828 participants [551 (66.5%) younger than 65 years and 553 (66.8%) men]. Each 10 μg/m³ increase in 12-month exposure to PM10 and NO2 was significantly and linearly associated with -0.20% (95% CI: -0.37 to -0.03) and -0.58% (95% CI: -0.99 to -0.18) changes in FMD in all participants. 12-month exposure to gaseous pollutants was also significantly but nonlinearly associated with lower FMD. 7-day exposure to Quartile 4 of SO2 was significantly associated with a 0.70% decrease in FMD compared to Quartile 1 (β = -0.70, 95% CI: -1.40 to -0.008). No relationships were observed between 7- and 14-day exposure to PM2.5, PM10, NO2, CO, and endothelial dysfunction. Although interaction effects were limited to SO2 and sex, significant associations with different air pollutants were only found in men and those younger than 65 years after stratified. Conclusions Long-term exposure to air pollution is strongly associated with decreased endothelial function, and susceptibility to air pollution varies significantly with age and sex. Further identification of different susceptible populations and proactive measures to mitigate air pollution may be beneficial in reducing the burden of cardiovascular disease.