MgCoFe layered double oxides (MgCoFe-LDO) were fabricated to activate peroxymonosulfate (PMS) for degradation of sulfamethoxazole (SMX), and the highly efficient degradation of SMX revealed an excellent catalytic activity of Mg2Co1Fe1-LDO for PMS under different pH values and water matrix. Scanning electron microscope analysis indicated the catalyst has a typical “flower-like” structure, and the X-ray powder diffraction analyses proved that the main crystal phase of Mg2Co1Fe1-LDO is CoFe2O4 and Mg1−xFexO, which is responsible for the good catalytic activity of Mg2Co1Fe1-LDO. The radical scavenging experiments confirmed that 1O2, ({text{SO}}_{4}^{cdot - }), OH and ({text{O}}_{2}^{cdot - }) were involved in the degradation of SMX, but 1O2 and ({text{SO}}_{4}^{cdot - }) played the dominant roles. According to the X-ray photoelectron spectroscopy (XPS) of Mg2Co1Fe1-LDO catalyst, it was referred that the species including CoOH+, CoO+, Fe3+, FeOH2+, Fe2+, etc. involve in the activation process of PMS. Moreover, the possible degradation pathways of SMX were proposed according to the detected intermediates including N-hydroxy sulfamethoxazole, 3-amino-5-methylisoxazole from LC–MS analysis, and the toxicity analysis via Toxicity Estimation Software Tool software shows that most of the degradation products of SMX have lower toxicity than SMX.