The application of intelligent process-based crop model parameter optimization algorithms can effectively improve both the model simulation accuracy and applicability. Based on measured values of soil N2O emission flux in wheat fields from 2020 to 2022, and meteorological data from 1971 to 2022, five parameters of the N2O emission flux module in the APSIM model were optimized using the variable step Fruit Fly algorithm (VSS-FOA). The optimized parameters were the soil nitrification potential, the range of concentrated KNH4 of ammonia and nitrogen at semi-maximum utilization efficiency, the proportion of nitrogen loss to N2O during the nitrification process, the denitrification coefficient, and the Power term P for calculating the denitrification water coefficient. Contrasting the optimized parameters using the VSS-FOA algorithm versus the default values supplied with the model substantially improved the goodness-of-fit to field measurements with the overall R2 increasing from 0.41 to 0.74, and a decrease in NRMSE from 17.1% to 11.4%. This work demonstrates that the VSS-FOA algorithm affords a straightforward mechanism for the optimization of parameters in models such as APSIM to enhance the accuracy of model N2O emission flux estimates.