The aims of optimizing the proton exchange membrane fuel cells (PEMFC) model is to obtain the parameters used to plot the polarization curves. These curves are affected by many parameters related to the nonlinearities associated with the PEMFC electrochemical processes and the vital tools for simulation and evaluation of PEMFC. In this paper, Dragonfly Algorithm (DA) is proposed to identify these unknown parameters. The results related to two real systems, a single cell Ballard Mark V and the SR-12 PEMFC generator, illustrate the effectiveness of the proposed methodology. The DA presented competitive results when compared with the results of the other reported metaheuristics algorithms.