Soil fertility plays a crucial role in crop growth, so it is important to study the spatial distribution and variation of soil fertility for agricultural management and decision-making. However, traditional methods for assessing soil fertility are time-consuming and economically burdensome. Moreover, it is hard to capture the spatial variation of soil properties across continuous geographic space using the conventional methods. As key techniques of digital soil mapping (DSM), spatial interpolation techniques have been widely applied in soil surveys and analysis in recent years, since they can predict soil properties at unknown points in continuous space based on limited sample points. However, further research is needed on spatial interpolation models for DSM in regions with variable climates and complex terrains, which are characterized by strong spatial variation in both environmental variables and soil fertility. In this study, taking a typical hilly area in a subtropical monsoon climate, i.e., Gaozhou, Guangdong Province, China, as an example, the performances of four popular spatial interpolation models (Random Forest (RF), Ordinary Kriging, Inverse Distance Weighting, and Radial Basis Function) for digital soil mapping on available phosphorus (AP) are compared. Based on RF, the spatial variation and its driving factors of the AP of Gaozhou are then analyzed. Furthermore, by selecting three typical truncation lines from different directions, the correlations between environmental variables and AP in different spatial positions are demonstrated. The root mean square error (RMSE) results of the above four models are 32.01, 32.08, 32.74, and 33.08, respectively, which indicate that the RF has a higher interpolation accuracy. Based on the mapping results of RF, the minimum, maximum, and mean values of AP in the study area are 38.90, 95.24, and 64.96 mg/kg, respectively. The high-value areas of AP are mainly distributed in forested and orchard areas, while the low-value areas are primarily found in urban and cultivated areas in the eastern and western regions. Vegetation and topography are identified as the key factors shaping the spatial variations of AP in the study area. Furthermore, the spatial heterogeneity of the influence strength of altitude and EVI is revealed, providing a new direction for further research on DSM in the future, i.e., spatial interpolation models considering the spatial heterogeneity of the influence of environmental variables.