AbstractBuildings increase the urban surface roughness and reduce near‐surface wind speeds in the urban canopy due to the drag effect. Urban heat storage and other effects cause urban warming as well, which decreases the urban boundary layer stability and enhances the turbulence exchange between upper and lower layer. As upper momentum is transported downward, the wind speed of urban canopy increases. Quantitative descriptions of these mechanisms are still lacking currently. This paper presents high‐resolution numerical simulation results of a mega city, Shanghai, China from 2016 to 2020 using the building effect parameterization in WRF (WRF‐BEP) with urban morphological parameters. The dynamic and thermal effects of building morphology on urban canopy wind speed were separated and their quantitative expression functions were given. The results indicate that the influence of building morphology on urban canopy wind speed is mainly dynamic resulting in a wind speed attenuation of approximately 50% and nearly constant. The thermal effect of building morphology on urban canopy wind speed increases with the urban heat island intensity, and the thermal effect could increase urban canopy wind speed by about 30% under the condition of strong urban heat island. The relative contributions of the dynamic and thermal effects of building morphology to urban canopy wind speed change with the wind speed. As wind speed increases, the contribution of the thermal effect of building morphology to urban canopy wind speed gradually decreases. This paper provides a quantitative relationship between the urban canopy wind speed variation and urban morphology, as well as urban heat island intensity.