The non-uniformity of the spatial distribution of precipitation has a great impact on the critical precipitation of flood warning for medium- and small-size rivers, and the spatial distribution of rainfall is difficult to accurately quantify, which has become an important problem that restricts the accuracy of flood warning. Combining Tyson's polygon and inter isochrone areas, a spatial heterogeneity index of precipitation (SHIP) that can reflect both the degree of spatial distribution and the center of precipitation is proposed. Based on the classification principle of support vector machine, SHIP is used to derive the dynamic critical rainfall indicator of flood warning. Taking the upper Xunhe River in the Hanjiang River as an example, the influence of spatial heterogeneity of precipitation on critical rainfall and early warning accuracy was analyzed. The results show that the closer the rainfall center is to the downstream, the smaller the critical rainfall is, the risk of underreporting would occur if the spatial heterogeneity of precipitation is not considered. Due to the indirect consideration of the regulation and storage of the basin, the introduction of the critical rainfall index estimated by SHIP can significantly improve the accuracy of flood warning. In addition, the proposed SHIP is not only suitable for flood warning, but also can be used for flood forecasting and drought warning, which need to consider the spatial heterogeneity of precipitation, it has broad application prospects. © 2020, China Water Power Press. All right reserved.