The application of rock-socketed pile in engineering is becoming ever more common. Finding the ultimate bearing capacity of rock-socketed piles with a high-performance ratio and precision is an important area of research. The rock-socketed piles underwent a field load test, and ABAQUS software was utilized to create a model of the interaction between the pile and the soil. For the geometric and physical parameters of the pile, soil, and bedrock, a total of eighteen pile-soil parameters were chosen. Reasonably constructed orthogonal and control variable tests are utilized, and a sensitivity analysis of the relevant factors is performed. Ten elements that significantly affect the ultimate bearing capacity of rock-socketed piles (with a probability less than 0.05) are selected as the input for the bearing capacity prediction of rock-socketed piles based on the test's consistent findings. The ultimate bearing capacity of rock-socketed piles is predicted using the support vector regression (SVR) model, and the absolute coefficient, mean absolute error (MAE), mean square error (MSE) and other indicators are chosen as the evaluation indices of the model prediction effect. The SVR model predicts an absolute coefficient of 0.7, which is an unsatisfactory prediction outcome. Consequently, the model is optimized via the nested grey wolf (GWO) algorithm. With a value of 0.995, the GWO-SVR model is more akin to 1 than the SVR model. There are 0.14 and 0.034 for the MAE and MSE, respectively. The models of (Artificial bee colony) ABC-SVR, (Cuckoo search) CS-SVR, (Sparrow search algorithm)SSA-SVR, and (Particle swarm optimization) PSO-SVR are built. When comparing different assessment indicators, the GWO-SVR model is smaller than the MAE and MSE. When the prediction model is used on a real project, the engineering requirements can be satisfied by the prediction effect.