Dense Global Position System (GPS) arrays can be used to invert the terrestrial water-storage anomaly (TWSA) with higher accuracy. However, the uneven distribution of GPS stations greatly limits the application of GPS to derive the TWSA. Aiming to solve this problem, we grid the GPS array using regression to raise the reliability of TWSA inversion. First, the study uses the random forest (RF) model to simulate crustal deformation in unobserved grids. Meanwhile, the new Machine-Learning Loading-Inverted Method (MLLIM) is constructed based on the traditional GPS derived method to raise the truthfulness of TWSA inversion. Second, this research selects southwest China as the study region, the MLLIM and traditional GPS inversion methods are used to derive the TWSA, and the inverted results are contrasted with datasets of the Gravity Recovery and Climate Experiment (GRACE) Mascon and the Global Land Data Assimilation System (GLDAS) model. The comparison shows that values of Pearson Correlation Coefficient (PCC) between the MLLIM and GRACE and GRACE Follow-On (GRACE-FO) are equal to 0.91 and 0.88, respectively; and the values of R-squared (R2) are equal to 0.76 and 0.65, respectively; the values of PCC and R2 between MLLIM and GLDAS solutions are equal to 0.79 and 0.65. Compared with the traditional GPS inversion, the MLLIM improves PCC and R2 by 8.85% and 7.99% on average, which indicates that the MLLIM can improve the accuracy of TWSA inversion more than the traditional GPS method. Third, this study applies the MLLIM to invert the TWSA in each province of southwest China and combines the precipitation to analyze the change of TWSA in each province. The results are as follows: (1) The spatial distribution of TWSA and precipitation is coincident, which is highlighted in southwest Yunnan and southeast Guangxi; (2) this study compares TWSA of MLLIM with GRACE and GLDAS solutions in each province, which indicates that the maximum value of PCC is as high as 0.86 and 0.94, respectively, which indicates the MLLIM can be used to invert the TWSA in the regions with sparse GPS stations. The TWSA based on the MLLIM can be used to fill the vacancy between GRACE and GRACE-FO.