Stoichiometric operation natural gas engine can achieve low emissions and high-power output by combining EGR and three-way catalytic converter. However, under high load conditions, engine performance will be deteriorated due to the knocking limits. The main methods to solve the knocking problems of spark ignition engines are shortening the flame propagation time and reducing the temperature and pressure rise of the end mixture. This paper firstly established a 3D model based on a natural gas engine, and then conducted the numerical simulations to investigate the effects of chamber geometry, hydrogen ratio and EGR ratio on engine knocking and combustion. The validation indicates a satisfied numerical results of chamber pressure and heat release rate. The turbine chamber exhibits relatively better swirl and tumble, thus achieving the highest turbulence intensity. HCNG fuel will increase the knocking tendency of the engine. In the meantime, the addition of hydrogen will also reduce the IMEP of the engine due to the low volume heat value of hydrogen. However, the addition of hydrogen may accelerate the combustion rate at the end of combustion to a certain extent. EGR can significantly reduce the knocking tendency of HCNG engine by reducing the combustion temperature in the cylinder. Compared with the case of 14% EGR rate, the ignition angle of 30% EGR case is advanced by 19 °CA, and the indicated thermal efficiency is increased by 2.06%.