This work presents the design and application of two control techniques—a model predictive control (MPC) and a proportional integral derivative control (PID), both in combination with a multilayer perceptron neural network—to produce hydrogen gas on-demand, in order to use it as an additive in a spark ignition internal combustion engine. For the design of the controllers, a control-oriented model, identified with the Hammerstein technique, was used. For the implementation of both controllers, only 1% of the overall air entering through the throttle valve reacted with hydrogen gas, allowing maintenance of the hydrogen–air stoichiometric ratio at 34.3 and the air–gasoline ratio at 14.6. Experimental results showed that the average settling time of the MPC controller was 1 s faster than the settling time of the PID controller. Additionally, MPC presented better reference tracking, error rates and standard deviation of 1.03 × 10 − 7 and 1.06 × 10 − 14 , and had a greater insensitivity to measurement noise, resulting in greater robustness to disturbances. Finally, with the use of hydrogen as an additive to gasoline, there was an improvement in thermal and combustion efficiency of 4% and 0.6%, respectively, and an increase in power of 545 W, translating into a reduction of fossil fuel use.