Proton Exchange Membrane fuel cells (PEMFCs) are a promising renewable energy source to convert the chemical reactions between hydrogen and oxygen into electricity. To simulate, evaluate, manage, and optimize PEMFCs, an accurate mathematical model is essential. Therefore, this paper improves the accuracy of a mathematical model for the PEMFC based on semi-empirical equations by proposing a meta-heuristic technique to optimize its unidentified parameters. Because the I–V characteristic curve of the PEMFC systems has a nonlinear and multivariable nature, conventional optimization techniques are difficult and time-consuming but modern meta-heuristic algorithms are ideally suited. Therefore, in this paper, a new improved optimization algorithm based on the Heap-based optimizer (HBO) has been proposed to estimate the unknown parameters of PEMFCs models using an objective function that minimizes the error between the measured and estimated data. This improved HBO (IHBO) effectively uses two strategies: ranking-based position update (RPU) and Lévy-based exploitation improvement (LEI) to improve the final accuracy to the SSE value with higher convergence speed. Four well-known commercial PEMFCs, (the 500 W BCS stack, NetStack PS6, H-12 stack, and AVISTA SR-12 500 W modular) are utilized to verify the proposed IHBO and compare it with 11 popular optimizers using various performance metrics. The experimental findings show the superiority of IHBO in terms of convergence speed, stability, and final accuracy, where IHBO could fulfill fitness values of 0.01170, 2.14570, 0.11802, and 0.00014 for the 500 W BCS stack, NetStack PS6, H-12 stack, and AVISTA SR-12 500 W modular, respectively.