The mechanical characteristics of rock are greatly influenced by hydrochemical corrosion. The chemical corrosion impact and deformation properties of the meso-pore structure of rock under the action of different hydrochemical solutions for the stability evaluation of rock mass engineering are of high theoretical relevance and applied value. Based on actual data, a support vector machine (SVM) rock constitutive model based on artificial bee colony algorithm (ABC) optimization is constructed in this article. The impact of porosity (chemical deterioration), confining pressure, and other aspects is thoroughly examined. It is used to mimic the triaxial mechanical behavior of rock under various hydration conditions, with high nonlinear prediction ability. Simultaneously, the statistical damage constitutive model and the ABC-SVM constitutive model are used to forecast the sample’s stress–strain curve and compare it to the experimental data. The two models’ correlation coefficients (R2), root mean square error (RMSE), and mean absolute percentage error (MAPE) are computed and examined. The correlation coefficient between the ABC-SVM constitutive model calculation results and the experimental results is found to be larger (R2 = 0.998), and the error is smaller (RMSE = 0.7730, MAPE = 1.51), indicating that it has better prediction performance on the conventional triaxial constitutive relationship of rock. It is a highly promising new way of describing the rock’s constitutive connection.