China is one of the regions most frequently affected by landslides, which have significant socio-economic impacts. Traditional slope stability analysis methods, such as the limit equilibrium method, limit analysis method, and finite element method, often face limitations due to computational complexity and the need for extensive soil property data. This study proposes a novel approach that combines Principal Component Analysis (PCA), Sparrow Search Algorithm (SSA), and Support Vector Machine (SVM) to improve the accuracy of slope stability prediction. PCA effectively reduces data dimensionality while retaining critical information. SSA optimizes SVM parameters, addressing the limitations of traditional optimization methods. The integrated PCA-SSA-SVM model was applied to a dataset of 257 slope stability samples and validated using five-fold cross-validation to ensure the model’s generalization capability. The results show that the model exhibits superior performance in prediction accuracy, precision, recall, and F1-score, with the test set achieving an accuracy of 84.6%, a recall of 84.7%, a precision of 83.1%, and an F1-score of 84.6%. The model’s robustness was further validated using slope data from the LongLian Expressway, demonstrating high consistency with the actual stability status. These findings indicate that the PCA-SSA-SVM-based slope stability prediction model has significant potential for practical engineering applications, providing a reliable and efficient tool for slope stability forecasting. Classify the training samples through cross-validation, using the accuracy of cross-validation as the fitness of the sparrow individual. Retain the optimal fitness value and position information.