The hydrogen fuel free-piston engine (FPE) is an ideal onboard power device for new energy vehicles due to its multiple advantages, including better fuel adaptability. However, the periodic cyclic variations of FPE pose a significant challenge in controlling its stable operation. To address this issue, a secondary fuel injection (SFI) control strategy based on the inner dead center (IDC) has been designed. It categorizes and manages IDC by exploring the relationship between different positions of IDC and IMEP. The controller calculates the SFI quantity to control the IMEP and reduce cycle fluctuations effectively based on the classification results and the difference between the current IMEP and the target value. In practice, a rapid simulation combustion control model based on the prototype was established to validate the effectiveness of the control strategy. After implementing active control, IMEP achieved the step response to the target value in just one cycle instantaneously, and the variation range stabilized from 0.3 bar to 0.1 bar. The degree of fluctuation in the PV curve of FPE significantly decreases before and after control, indicating more stable FPE operation. The results demonstrate that this control strategy can effectively achieve precise IMEP control and reduce cycle variations. This means a more reliable and efficient operation of hydrogen fuel FPEs in new energy vehicles, enhancing their performance and viability.