Effective activation of persulfate (PS) contributes to the efficient degradation of emerging organic pollutants in water matrices. Cobalt phosphides (CoxP) have been testified as promising catalysts in efficiently activating PS, but their applications in water purification are still restricted by hazardous and costly chemical phosphorus sources used in traditional syntheses. Here, the synthesis of CoxP on biochar is regulated by an eco-friendly biomass phytic acid (PA) through low-speed ball milling combined with catalytic pyrolysis. Under the condition of 1 mM PS, 0.2 g/L catalyst, and pH 7, SMX (10 mg/L) can be thoroughly removed within 120 min with a TOC removal efficiency of 52 %. When dealing with low concentrations of SMX (0.25–1 mg/L), the oxidation is completed within 60 min. The simulated complex aqueous matrices (sodium humate solution and surface water) only exert trivial inhibition of SMX removal. Moreover, the leached Co2+ ion concentration is lower than the discharge standard (0.39 mg/L within 180 min). The crucial reactive oxygen species are identified as SO4−•, •OH, 1O2, and O2−•. Density functional theory (DFT) calculations indicate that the most pivotal active site in CoP/biochar is the P ion, while in Co2P/biochar is the Co ion. Biochar may potentially influence the electronic structure, thereby altering the oxidation states of ions and significantly enhancing the synergistic catalytic effect of anions in both cobalt phosphides. The more pronounced anion co-catalysis endows CoP/biochar with a better catalytic capacity than Co2P/biochar.