Sound speed profile (SSP) inversion is usually performed by linear statistical regression, such as the single empirical orthogonal function regression (sEOF-r) model. However, due to the complex dynamic activities of the ocean, the relationship between parameters is not strictly linear, often resulting in an unsatisfactory inversion result. In this study, an algorithm based on the random forest (RF) integrated learning model, for SSP inversion, was proposed. Using the sea surface temperature anomaly (SSTA) and sea surface height anomaly (SSHA) data, the sound speed profile of the upper 1000 m layer in the South China Sea was reconstructed, and its accuracy was evaluated through the root mean square error (RMSE). The accuracy of the evaluation demonstrated that the RF model proposed here could reconstruct the SSP in the upper 1000 m layer better than the sEOF-r can. Compared with the latter, the average reconstruction accuracy of the RF model was improved by 0.56 m/s. The linear regression of the sEOF-r model fell short of expectations in the regression between surface and subsurface parameters. By removing the constraints of linear inversion, the nonlinear regression of the RF model showed a smaller RMSE and better robustness in the reconstruction process and was superior to the sEOF-r model at all depths. As a result, it provided an effective integrated learning model for SSP reconstruction.