Foodborne pathogens have become one of the global problems threatening human life and health, and Fenton-like photocatalytic technology with nanomaterials as the core opens up a new way to eliminate pathogens. In this paper, m-WO3-x was prepared by controlling oxygen vacancies and employing a hard template to construct a mesoporous structure, and the ternary composite N-Nb2CTx/TpPa-1/m-WO3-x was successfully constructed by combining with N-Nb2CTx/TpPa-1. In comparison to the monomers, the ternary composite has a large specific surface area and pore volume, which enhances the light trapping ability, and greatly reduces the recombination of photogenerated electron-hole pairs. Simultaneously, the construction of oxygen vacancies can trigger the localized surface plasmon resonance effect, thereby broadening the spectral response range and enhancing the photothermal effect. The photocatalytic sterilization efficiency of oxygen vacancies synergistic Fenton-like was the highest when 2 mM of H2O2 was added, and the cell concentration decreased from 7.14 to 3.26 log10CFU/mL. The establishment of N-Nb2CTx/TpPa-1/m-WO3-x Fenton-like photocatalysts will provide a theoretical basis for reducing the spread of foodborne pathogens.