It is well known that urban areas are typically hotter than the surrounding (vegetated) rural areas. However, the contribution of urbanization to the trends of extreme temperature events such as heat waves (HWs) is less understood. Using a homogenized meteorological dataset drawn from nearly 2,000 stations in China, we find that urban and rural areas have different HW trends and the urban-rural contrast of HW trends varies across climate regimes. In wet climates, the increasing trends of HWs in urban areas are greater than those in rural areas, suggesting a positive contribution of urbanization to HW trends. In arid regions, the urbanization contribution to HW trends is smaller and even negative. The stronger urbanization contribution to HW trends in wet climates is linked to the smaller variability of urban heat island intensity. This study highlights the important role of local hydroclimate in modulating the urbanization contribution to extreme temperatures.