This paper establishes a mathematical model of the high-pressure common rail injection system used in diesel engines according to the parameters of its key components, and AMESim 2020 software was used to establish a simulation model of the common rail injection system used in diesel engines. The simulation model mainly includes a high-pressure oil pump model, a common rail pipe model, and a model of four injectors. This paper also describes an experimental analysis of the accuracy of the established simulation model. Through a simulation analysis of the system rail’s pressure fluctuation and pressure characteristics, it was concluded that the length of the common rail pipe, the diameter of the common rail pipe, and the inner diameter of the high-pressure fuel pipes are important influencing parameters for the rail pressure characteristics of the system. In this study, according to the original common rail pipe and high-pressure fuel pipe model, a response surface methodology was used to optimize and analyze the parameters of the common rail pipe and high-pressure fuel pipes, and the optimal size parameters for the common rail pipe and high-pressure fuel pipes were obtained with the minimum rail pressure fluctuations and the average rail pressure setpoint. After the optimization, the pressure for the common rail pipe of the high-pressure common rail system was increased by 0.82%, the pressure fluctuation was reduced by 21.66%, the injection pressure was increased by 1.15%, the single injection volume was increased by 0.86%, and its fuel injection characteristics were significantly improved.