The carburizing process is a key technology that affects the mechanical properties of the surface of the hydraulic motor stator guide rail, and the related process parameters have an important influence on surface hardness, the thickness of the carburized layer, and the deformation of the guide rail. However, at present, the relationship between the carburizing process parameters and the surface mechanical properties of the target is not clear. This paper proposes a “hardness prediction and process parameter optimization” method. Firstly, a finite element model is established, with carburizing time, temperature, and carbon potential as the three input factors; the optimal Latin hypercubic experimental design and sensitivity analysis are applied. Secondly, surface hardness, carburized layer thickness, and deformation are taken as the output values, and an RBF neural network is used to construct the prediction model. The results show that the RBF neural network can be accurately used for the prediction of surface hardness, the thickness of the carburized layer, and deformation, and for the optimization of process parameters. The optimized parameters of surface hardness and the thickness of the carburized layer were increased by 4.2% and 5.1%, respectively, and the deformation amount was reduced to 0.31 mm, achieving the goal of optimal design.