Membrane separation technology is widely recognized as an efficient method for treating organically polluted wastewater in virtue of high performance and straightforward operation. However, the practical application of membranes is inevitably confronted with contamination issues, presenting a major challenge in terms of fouling resistance. To address this issue, a defensive-offensive dual-defense strategy based on wettability and catalytic ability control is proposed. With this concept, a novel nanofibrous membrane with a unique structure was successfully prepared through polyacrylonitrile (PAN) electrospinning, pre-oxidation, CoFe Prussian blue analogue (PBA) and polypyrrole (PPy) modification, and calcination processes. For the passive defense mode, the as-prepared membrane has shown good underwater-superoleophobicity for various types of oils, good separation capability for corresponding oil–water emulsions with retention ratios of above 99 % and fluxes ranging from 231.5 to 1524.2 L·m−2·h−1·bar−1, as well as organic solvent (dimethylformamide, DMF) resistance. For the offensive defense mode, this membrane exhibits well catalytic degradation performance for refractory pollutants with the assistance of peroxymonosulfate (PMS), which is due to the membrane being decorated with catalytic nanoparticles that contain abundant encapsulated ultra-small Fe doped Co3O4 (∼2.28 nm), and that is much smaller than the size of the pristine PBA (∼33.8 nm). Notably, the surfactants present in oil-in-water emulsions are found to be the main cause of membrane fouling, where the cationic surfactants exhibit the most significant fouling effect, while the introduction of photo-Fenton-like catalysis can endow the membrane with excellent antifouling performance and extended service life, and nearly a fully recover of emulsion separation performance was achieved. Overall, this work paves pathways to the design of advanced membranes for sustainable wastewater treatment.