In this paper, the nonlinear model of polymer exchange membrane (PEM) fuel cell system is first extracted and then tested and evaluated for various temperatures and pressures. With the severe nonlinear characteristics of the PEM fuel cell system, using the proportional-integral-derivative (PID) controller for the linear model of the PEM fuel cell system could not guarantee robust control under parametric uncertainty and severe load fluctuations. The use of a linear model-based controller increases the pressure in both the anode and cathode areas, which in turn induces a high pressure difference across the polymer membrane, thus reducing the lifespan of the fuel cell. The proposed method uses the particle swarm optimization (PSO) algorithm, taking into account practical parameters, to design a PID controller for a nonlinear model of the fuel cell. Comparison of the results obtained from the conventional PID controller and the proposed PID-PSO structure shows that PID-PSO can desirably guarantee the specifications of overshoot, transient time, and settling time for a defined pressure difference across the anode and cathode plates.