In this paper, a Nonlinear Model Predictive Control (NMPC) is designed using a data-based model of Proton Exchange Membrane Fuel cell (PEMFC) for output voltage control. To capture PEMFC complex dynamics and non-linearities, Machine Learning (ML) algorithms are utilized to model the behavior of the system. This model is then embedded inside the NMPC controller to provide the predictions required for solving the optimization problem. The NMPC not only provides precise output voltage tracking, but also can simultaneously reduce the fuel consumption of the stack as one additional term in the cost function. Moreover, the possible upper and lower bounds of the control effort generated by actuators are set as the hard constraints of NMPC. The simulation results show that while these constraints are not violated, the desired output voltage is generated with less fuel being consumed comparing to the case that fuel consumption is not controlled.