The prediction of slope service life can quantitatively and accurately evaluate the long-term safety of limestone slopes, but its prediction model is not yet fully developed. Therefore, in order to solve the problem of service life calculation of limestone slopes, an optimization method based on dissolution rate is proposed. Taking the service life of limestone slope as the objective function, the effective length of the penetrated section and non-penetrated section and the shear parameters of the structural surface after several years of service were calculated according to the dissolution rate and the attenuation rate of the shear parameters. Combined with the equilibrium equation of the sliding body and the yield conditions of the penetrated and non-penetrated section of the structural surface, the stable nonlinear mathematical programming model of the limestone slope for long-term service was established, and then the model was solved by the “sequential quadratic programming method” to obtain the service life of the slope. According to the comparison, the mean relative error between the numerical simulation results of the finite element method and the proposed algorithm is 2.47%, indicating that the algorithm can accurately predict the service life of limestone slopes.