Urban forest is considered an effective strategy for mitigating urban air pollution via deposition, absorption and dispersion processes. However, previous studies had focused mainly on the deposition effect or removal capacity near the ground, while the net effect of the urban forest on air quality is rarely evaluated in the vertical dimension. In this study, PM2.5 (particulate matter with diameter less than 2.5), PM10 (particulate matter with diameter less than 10 μm), carbon monoxide (CO), sulfur dioxide (SO2), nitrogen dioxide (NO2), and ozone (O3) concentrations, air temperature, relative humidity, and atmospheric pressure at 0, 2.5, 5, 10, 15, 20, 30, 40, 60, 80, and 100 m in urban forest, street, and community areas were collected by unmanned aerial vehicles (UAVs) equipped with Sniffer4D V2 on overcast and sunny days. The PM, CO, NO2, and O3 concentrations increased with height below 20 m and then slightly decreased with height on an overcast day, whereas SO2 concentrations decreased with height within 20 m. The urban forest increased PM concentrations in the morning of an overcast day, whereas it decreased PM concentrations in the afternoon of the overcast day. The forest obstructed PM dispersion from the canopy when PM concentrations grew lower in the morning, but it hindered PM from deposition when PM concentrations grew higher in the afternoon.