Considering the blind parameters selection and the high dimension of input data in least squares support vector machine (LSSVM) modeling process, a kernel principal component analysis (KPCA)-based LSSVM forecasting method optimized by improved grey wolf optimization (GWO) algorithm is proposed. As an excellent forecasting model, the regression forecasting performance of LSSVM is greatly affected by parameters selection of the model. An improved GWO algorithm with better performance is proposed to determine the optimal parameters of LSSVM. This improved GWO algorithm improves the optimization precision and global optimization ability of the standard GWO algorithm. The parameters of LSSVM model are taken as the optimization object that is optimized by improved GWO algorithm. At the same time, the input variables of LSSVM are correlated and redundant. KPCA algorithm can eliminate the correlation and redundancy between input variables. The reduction of input variables reduces the complexity and training time of modeling process, and the coupling between input variables, to improve the prediction accuracy of LSSVM. The dynamic liquid level of beam pump is chosen as the research object. The proposed forecasting method is applied to the prediction of dynamic liquid level. The simulation comparison on actual collected dynamic liquid level data is performed. The simulation results show that the proposed forecasting method has better predictive performance for the dynamic liquid level.