Abstract:[Objective] Rapid and accurate monitoring of farmland soil pH value were explored for large-scale soil improvement and achieving fine management of farmland. [Methods] The cotton fileds of the 12 th regiment at Alar City in the South of Xinjiang Uygur Autonomous Region were selected as the study area, in-situ hyperspectral data of 231 sample points were collected by grid sampling method, and soil samples at 116 sampling points were collected simultaneously. The correlation between in-situ hyperspectral reflectance data after different pretreatment modes and soil pH value was analyzed. Partial least squares regression, support vector machine regression and random forest were used to establish the hyperspectral inversion model of soil pH, respectively. According to the model evaluation indexes, the optimal model was selected and used for inversion and mapping of the pH value of the uncollected soil sample points. [Results] The reflectance after the differentia treatment could effectively improve its correlation with soil pH value. The random forest model with second-order derivative of reflectance was the optimal model among all models with R2 of 0.87, RMSE of 0.04, and RPD of 2.53. The digital map interpolated by the pH value of optimal model inversion was highly consistent with the spatial distribution characteristics of the actual measurement pH value, which could objectively reflect the spatial distribution of soil alkalinization. [Conclusion] The random forest model is the optimal model for in-situ inversion of soil pH value in cotton fields in South Xinjiang Uygur Autonomous Region, and Kriging interpolation could objectively visualize the soil pH value distribution in the study area.