A magnetic ternary double Z-scheme ATP-g-C3N4/SnFe2O4/Bi2WO6 (AG/SFO/BWO) heterojunction was prepared by a simple and green hydrothermal process, which was successfully used in the dye degradation. AG/7.5 %SFO/BWO catalyst demonstrated outstanding visible-light-induced degradation, achieving an impressive 96.72 % degradation of rhodamine B (RhB) in 2 h. Compared with Bi2WO6 (BWO) and SnFe2O4/Bi2WO6 (SFO/BWO), the degradation efficacy was increased about 1.65 and 1.16 times, respectively. After being used for five batches, the degradation rate of RhB remained over 90 %. Moreover, AG/7.5 %SFO/BWO showcased remarkable efficacy in degrading methylene blue (MB), Congo red (CR), and tetracycline (TC). Bacterial toxicity test indicated the toxicity of dyes was rapidly decreased in 24 h. Physicochemical properties and morphological characteristics of the prepared photocatalysts were investigated by various methods, including XRD, FTIR, XPS, SEM, TEM, BET, VSM, UV–vis, and EIS. AG/7.5 %SFO/BWO, utilizing a dual-Z scheme pathway, efficiently absorbed broad light, yielding multiple active agents, primarily hole (h+) and superoxide radical •O2−. The double Z-scheme heterojunction structure enhanced the electron-hole separation and ensured a stable photochemical environment. UPLC-HRMS was used to identify intermediates during the RhB degradation. Its degradation pathway and catalytic mechanism were illustrated systematically. The bio-toxicity (acute toxicity, developmental toxicity, and mutagenicity) of the intermediates was also evaluated by T.E.S.T.