In order to achieve zero carbon emissions in the field of internal combustion engines, ammonia/hydrogen hybrid fuel engines are one of the best solutions. However, due to the poor ignition and combustion performance of ammonia fuel, the ammonia/hydrogen mixed fuel engine has the problems of high NOx emissions and long ignition delay, poor power performance. Therefore, this paper will study the injection strategy of ammonia/hydrogen dual fuel engine under different compression ratio to optimize the engine performance, and find the best combination of compression ratio and ammonia/hydrogen mixed fuel injection timing. In the simulation study, there are four groups of compression ratios from 13.5 to 16.5, and each group of compression ratios corresponds to eight groups of injection timing from 12°CA BTDC to 24°CA BTDC. The results show that after delaying the injection timing of ammonia/hydrogen mixture fuel, the power performance and economy of the engine are reduced, the ignition delay period is shortened, HC, CH2O, CO and soot emissions are gradually increased but at a very low level, and NOx emissions are significantly improved; After the compression ratio is increased, the engine's power performance and economy are greatly improved, HC, CH2O, CO and soot emissions are slightly higher, and NOx and N2O emissions are gradually increased. Under any combination of compression ratio coupling injection timing, the engine NOx emission can meet the Tier II emission standard. When the injection timing of ammonia/hydrogen mixed fuel is 12°CA BTDC and the compression ratio is 13.5, the NOx emission of this operation combination of ammonia hydrogen dual fuel engine can meet the Tier III emission standard. The research results of this paper can promote the engine field to zero carbon emissions and meet the Tier III emission standards, while ensuring that the engine has sufficient power.