Oxygen excess ratio (OER), which is influenced by the air flow input to the cathode, is one of the important factors affecting the performance of fuel cell system. Insufficient oxygen supply will result in a sharp drop in output voltage, while an excessive supply will bring about a large parasitic power load on the air compressor, reducing the net output power of the system and operating efficiency. Both insufficient and excess oxygen supply can adversely affect the operating life of the proton exchange membrane fuel cell (PEMFC). Due to the serious nonlinear, hysteresis, uncertainty and interference in the process of OER control, this paper proposes an OER feedforward control based on extended state observer (ESO) for a PEMFC auxiliary system with the ESO to predict the total disturbance to improve the dynamic response of the system with large time delay utilizing terminal sliding mode control (TSMC). The control strategy is divided into two stages. The first stage constructs an ESO to realize real-time observation of the state variables required for the internal operation of the auxiliary machine system and the PEMFC, and yields the air compressor voltage control signal through terminal sliding mode control. In the second stage, combined with V/f control for the compressor, the transmitted air flow is adjusted, ultimately achieving the goal of changing the OER of the PEMFC and improving operating efficiency. The simulation results show that the proposed control strategy has good anti-interference capabilities, a faster response, and less overshoot. The gas flow transmission in the gas supply system is more robust, the PEMFC operation is safer, and its lifespan is extended.