The flow of gas and heat transfer in the cylinder of a linear hydrogen engine are key factors affecting the homogeneous mixing of engine fuel and energy conversion. In this article, the effects of injection duration on the blending of the fuel spray, the motion of the vortex and the heat transfer of the linear hydrogen engine are explored on the basis of a new coupled thermodynamic and kinetic model. The results show that between 0.05 ms and 0.25 ms, the overall performance of the engine is best when the injection duration is 0.05 ms. At this time, the eddy current distribution is relatively wide, with a maximum turbulent kinetic energy of 20 m2/s2, which is about 51% higher than that at 0.25 ms. The indicated thermal efficiency and cumulative heat release have also reached their maximum values at this time. The heat transfer coefficient and heat flux rate are 16.7% and 33.2% higher than 0.25 ms, respectively. In terms of emission, with the increase of fuel injection duration, incomplete combustion of fuel in cylinder makes Soot emission increase. Taken together, an injection duration of 0.05 ms is the most appropriate.