Hydrogen and ammonia are two carbon-free alternative fuels for engines. They represent some of the most viable pathways toward achieving our objectives of energy conservation and reducing emissions. To research the quality of the hydrogen-ammonia-air mixture formation under different hydrogen/ammonia injection timing, a three-dimensional simulation model for a PFI(Port Fuel Injection) hydrogen internal combustion engine with the inlet, outlet, valves and cylinder was established using Converge software. Research focused on the space distribution characteristics and variation law of velocity field, concentration field and turbulent kinetic energy under different injection timings in order to reveal the influence of these parameters on hydrogen-ammonia-air mixture formation process. The results showed that hydrogen injection should be neither too early nor too late. Backfiring can be initiated too early or too late. Therefore, the optimum starting point for hydrogen/ammonia injection should be 338°CA.