Soil pH is crucial for the quality of the farmland and crop growth. The objective of this study is to analyze the spatial and temporal variations of farmland soil pH in Xinjiang (XJ), and to provide a scientific basis for soil improvement and agricultural production optimization. Based on soil pH data from XJ farmland in two periods, 2008~2010 and 2019~2021, geostatistical methods and kriging spatial interpolation techniques were employed to analyze the spatiotemporal changes in soil pH and to investigate the relationship between relevant influencing factors and pH over more than a decade. The results indicate that the spatiotemporal distribution of soil pH in XJ farmlands is uneven. Between 2019 and 2021, the average soil pH was 8.11, generally being on the higher side, with a coefficient of variation (CV) of 3.85%, indicating minimal spatial variability. In the farmland soil of Southern Xinjiang (S-XJ), the average pH value was 8.17, significantly higher than that of Northern Xinjiang (N-XJ), which was 8.10, demonstrating a spatial pattern of “higher in the south, lower in the north”. Over the past decade, soil pH in XJ has significantly increased from 8.11 to 8.13, with a 0.05 unit increase in the north and a 0.01 unit increase in the south (p < 0.05). Regionally, Altay saw the largest increase of 0.22 units, while Bortala Mongol Autonomous Prefecture (Bortala) experienced the most significant decrease, dropping by 0.59 units. Furthermore, this study found that factors such as topography, nutrients, and irrigation methods all have certain influences on the spatial distribution of soil pH in XJ farmland, while variations in climate factors and fertilization levels may affect its long-term temporal changes. These research findings will provide new insights for adjusting and updating agricultural management measures related to soil pH regulation in XJ.