Xanthates are largely used in the mining industry as mineral flotation agents, causing serious environmental problems, and therefore, removing them effectively is a significant barrier for sustainable green mining that needs to be addressed. Here, nanostructured mesoporous CoFe2O4/Co3Fe7@carbon prepared by clean and facile mechanochemical-molten salt process is employed as a trifunctional magnetic adsorbent-photocatalyst agent (M-APh) for the efficient adsorption of potassium ethyl xanthate (KEX) from its solutions in dark, and the photocatalytic degradation of the compound under LED-light irradiation. The surface- and bulk‑carbon content of M-APh is evaluated to be around 88 and 80 wt%, with the surface area of 355 m2/g and the average pore size of 3.7 nm, enabling the adsorption of 6.12 wt% KEX on its surfaces in dark. The ferromagnetic performance of M-APh, characterized by the coercivity (Hc), saturation magnetization (Ms) and remnant (Mr) values of 735 Oe, 17.9 emu/g and of 6.1 emu/g, respectively, is an asset supporting the facile separation of the agent from its suspensions. The effects of various parameters including the concentration of KEX in the solution, the dosage of M-APh, the wavelength of the LED-light, and the initial pH on the KEX removal performance of M-APh are studied. Within 5 h of LED-light irradiation of wavelengths 450, 385 and 365 nm, the KEX removal rates are recorded at 96.59, 98.61 and 99.49 %, respectively. Possible mechanisms involved in the adsorption and photocatalytic degradation of KEX are discussed.