Under global warming, surface urban heat islands (SUHI) threaten human health and urban ecosystems. However, scant research focused on exploring the complex associations between urban form factors and SUHI at the county scale, compared with rich studies at the city scale. Therefore, this study simultaneously examined the nonlinear and spatial non-stationary association between SUHI and urban form factors (e.g., landscape structure, built environment, and industrial pattern) across 2321 Chinese counties. An explainable spatial machine learning method, combining the Geographically Weighted Regression, Random Forest, and Shapley Additive Explanation model, was employed to deal with nonlinearity, spatial non-stationary, and interpretability of modeling. The results indicate the remarkable spatial disparities in the relationship between urban form factors and SUHI. Landscape structure contributes the most in southern counties, while the built environment is more important in northeastern counties. The impact of building density and building height increases with the county size and becomes the main driver of urban heat in mega counties. Most urban form factors exhibit nonlinear impacts on SUHI. For example, urban contiguity significantly affects SUHI beyond a threshold of 0.93, while building density does so at 0.17. By comparison, the influence of shape complexity remains stable above a value of 7. Factors such as industrial density and diversity have a varied influence on SUHI between daytime and nighttime. The results of local explanations and nonlinear effects provide targeted regional mitigation strategies for urban heat.