Introduction

Water is an indispensable resource for sustaining life across ecosystems, yet its contamination by antibiotics, pesticides, and synthetic dyes has escalated into a global environmental crisis, jeopardizing human health and ecological stability. Addressing this challenge requires innovative solutions to degrade persistent pollutants effectively. Advanced oxidation processes (AOPs), particularly those leveraging visible-light-driven photocatalysis and Fenton-like reactions, have emerged as a frontier technology for water purification due to their capacity to generate highly reactive oxygen species (ROS) under mild conditions1,2,3,4. Central to these processes is the development of efficient, stable, and recyclable heterojunction catalysts capable of optimizing charge separation and ROS generation.

Recent advancements highlight the potential of multiphase composite catalysts, where materials with distinct band structures synergize to enhance charge carrier dynamics. For instance, high-entropy catalysts with tailored conduction and valence band positions facilitate rapid separation of photogenerated electron–hole pairs, amplifying catalytic efficiency5,6,7,8,9,10. Mesoporous materials, in particular, serve as ideal substrates due to their high surface area and adsorption capacity. When functionalized with metals or metal oxides, they promote electron transfer and activate H₂O₂ decomposition into hydroxyl radicals (·OH), a critical step in pollutant degradation5,6,7,8,9,10.

Zinc ferrite (ZnFe₂O₄, ZFO), a narrow-bandgap (1.0–2.0 eV) n-type semiconductor, has garnered attention for its visible-light absorption, magnetic recoverability, and photo-fenton effect, which synergize with H₂O₂ to generate ROS11,12,13,14,15,16,17,18,19,20,21. Concurrently, graphitic carbon nitride (g-C₃N₄), a metal-free polymeric semiconductor with a 2.7 eV bandgap and redox-active bands (−1.3 and + 1.4 eV), offers tunable structural properties, high chemical stability, and enhanced charge migration via its 2D/3D architectures22,23,24,25. Integrating ZFO with g-C₃N₄ presents a promising strategy to bridge their complementary advantages26,27,28,29,30,35,36,37,38,39,40,41: First, ZnFe₂O₄, as a narrow-bandgap spinel ferrite semiconductor, possesses a complementary band structure to g-C₃N₄. This enables the construction of Type-II or Z-scheme heterojunctions, where the built-in electric field at the interface facilitates directional migration and efficient separation of photogenerated electron–hole pairs (e⁻-h⁺), thereby drastically reducing recombination rates26,27,28,29,30. Second, the uniform loading of ZnFe₂O₄ nanoparticles onto g-C₃N₄ nanosheets or within mesopores forms core–shell or layered architectures. This not only enhances active site density and shortens charge transfer pathways but also optimizes mass transport kinetics35,36,37,38,39,40,41. Third, the composite system broadens the light absorption spectrum: g-C₃N₄ dominates the visible region, while ZnFe₂O₄ extends absorption to near-infrared and partial visible light, achieving full-spectrum solar energy utilization up to 700 nm9,10,11. Furthermore, the high conductivity of ZnFe₂O₄ provides rapid electron transport channels for g-C₃N₄, suppressing bulk charge recombination. As a protective layer, ZnFe₂O₄ mitigates photocorrosion of g-C₃N₄ and strengthens interfacial bonding via covalent bonds or hydrogen bonds, endowing the material with superior chemical stability compared to the weak van der Waals interactions in pure g-C₃N₄. ZFO’s magnetic recyclability and ROS-generating capacity, coupled with g-C₃N₄’s expansive surface area and charge transport efficiency. In summary, the synergistic optimization of light absorption, carrier separation efficiency, structural stability, and anti-photocorrosion properties positions this composite as an innovative strategy for high-efficiency solar-driven catalytic systems.

In this study, mesoporous g-C₃N₄ was synthesized via thermal polymerization of urea and melamine, followed by the hydrothermal deposition of ZFO nanoparticles using zinc acetate and iron chloride precursors. The resultant ZnFe₂O₄@g-C₃N₄ heterostructure was systematically characterized through SEM, TEM, XRD, PL and UV–Vis spectroscopy to elucidate its structural, morphological, and optoelectronic properties. The photocatalytic performance was evaluated via visible-light-driven degradation of methylene blue (MB), with mechanistic insights into charge transfer pathways and ROS generation explored. Furthermore, the magnetic recoverability and cyclic stability of the composite were assessed to underscore its practical viability. This work not only advanced the design of multifunctional heterojunction catalysts but also highlighted their potential in environmental remediation, particularly for industrial wastewater treatment and water quality restoration.

Experimental section

Reagents and characterization

All chemicals, including urea (CH₄N₂O, ≥ 99%), melamine (C₃H₆N₆, ≥ 99%), zinc acetate dihydrate (Zn(CH₃COO)₂·2H₂O, ≥ 99%), iron(III) chloride hexahydrate (FeCl₃·6H₂O, ≥ 98%), methylene blue (C₁₆H₁₈ClN₃S, ≥ 95%), and hydrogen peroxide (H₂O₂, 30 wt%), were of analytical grade and procured from Sinopharm Chemical Reagent Co., Ltd. (China). Deionized water (resistivity ≥ 18.2 MΩ·cm) was produced using a laboratory-grade purification system.

The crystallographic properties of the synthesized g-C₃N₄ and ZnFe₂O₄@g-C₃N₄ composites were analyzed using an Ultima IV X-ray diffractometer (Rigaku Corporation, Japan) with Cu-Kα radiation (λ = 1.5406 Å) operated at 40 kV and 40 mA. Morphological and microstructural features were examined using a JEM-2100 F field-emission transmission electron microscope (JEOL Ltd., Japan) at an accelerating voltage of 200 kV. The optical absorption properties and photocatalytic degradation kinetics of methylene blue were monitored via a PerkinElmer LAMBDA750 UV/Vis/NIR spectrophotometer, with spectra recorded in the range of 200–800 nm.

Experimental process

Preparation of g-C 3 N 4 nanoparticles

Graphene-like g-C3N4 was prepared using a thermal polymerization method. Details of the sample preparation could be found in references10,11.

ZnFe 2 O 4 @g-C 3 N 4 preparation of nanoparticles

The ZnFe₂O₄@g-C₃N₄ heterostructure was synthesized via a hydrothermal route. Briefly, 0.5 g of g-C₃N₄ was uniformly dispersed in 50 mL of deionized water via ultrasonication (40 kHz, 30 min). Separately, stoichiometric ratios of zinc acetate dihydrate (Zn(CH₃COO)₂·2H₂O) and iron(III) chloride hexahydrate (FeCl₃·6H₂O) (mass ratios detailed in Table 1) were dissolved in 25 mL of deionized water under magnetic stirring (500 rpm, 30 min). The metal precursor solution was then introduced dropwise into the g-C₃N₄ suspension, followed by the addition of 0.5 g urea as a pH-modulating agent. The mixture was stirred vigorously (60 min) to ensure homogeneity.

Table 1 The Feed ratio of ZnFe2O4@g-C3N4 catalysts.
Scheme 1
scheme 1

The schematic diagram for the synthesis process of ZnFe₂O₄@g-C₃N₄.

The resultant suspension was transferred into a 100 mL polytetrafluoroethylene (PTFE)-lined autoclave and subjected to hydrothermal treatment in a programmable oven. The temperature was ramped to 150 °C at a rate of 2 °C/min and maintained for 4 h. After natural cooling to ambient temperature, the precipitate was isolated by centrifugation (7000 rpm, 15 min), followed by sequential washing with deionized water and ethanol (three cycles each) to remove residual impurities. The schematic diagram for the synthesis process of ZnFe₂O₄@g-C₃N₄ was shown in Scheme 1. The purified product was vacuum-dried at 60 °C for 24 h and stored in an airtight container for subsequent characterization and application. The samples name are list in Table 1. The symbol “−0”, “−1”, “−2”, “−3”, “−4”, “−5”, “−6” and “−7” means the increasing mole of raw material “Zn(AC)2” as 0, 0.001, 0.002, 0.003, 0.004, 0.005, 0.006, and 0.007 mol. As shown in last column, the mass ratio ZnFe2O4 to g-C3N4 and ZnFe2O4 were 0, 0.325, 0.491, 0.591, 0.658, 0.707, 0.743, and 0.771 in different samples.

Photocatalytic degradation of methylene blue

The visible-light-driven photocatalytic activity of ZnFe₂O₄@g-C₃N₄ was assessed through the degradation of methylene blue (MB) in aqueous media. Prior to illumination, 50 mg of the catalyst was dispersed in 100 mL of MB solution (30 mg/L) within a 100 mL borosilicate glass reactor under darkroom conditions. The suspension was ultrasonicated (40 kHz, 3 min) to ensure uniform catalyst distribution, followed by magnetic stirring (60 min) to establish adsorption–desorption equilibrium between the dye and catalyst surface. The initial pH was one of important parameters in photocatalytic processes. During all the degradation experiments, the pH of the methylene blue aqueous solution, which was the target for degradation, was adjusted to pH = 7 using dilute solutions of sodium hydroxide and hydrochloric acid.

A 300 W xenon lamp equipped with a 420 nm cutoff filter was positioned 20 cm above the reactor to simulate visible-light irradiation. During all the degradation experiments, the temperature of the methylene blue aqueous solution, which was the target for degradation, was adjusted and maintained to 25℃ using condensate system. Aliquots (3 mL) were extracted at 10-min intervals and immediately centrifuged (7000 rpm, 2 min) to isolate the catalyst, thereby preventing interference in absorbance measurements. The residual MB concentration was quantified via UV–Vis spectroscopy by monitoring the attenuation of its characteristic absorption band at λ = 664 nm. The schematic diagram for degrading MB was shown in Scheme 2. The degradation efficiency (η, %) and real time change of absorption intensity were calculated using the equation: 

$$\eta = \left( {{1} - {\text{C}}/{\text{C}}_{0} } \right) \times {1}00\%$$
(1)
$${\text{C}}/{\text{C}}_{0} {\text{or C}}/{\text{C}}_{0} \times { 1}00\%$$
(2)

where C0 and C represent the initial and time-dependent absorbance intensities of MB, respectively10,11.

Scheme 2
scheme 2

The schematic diagram for degrading MB.

Results and discussion

XRD structural characterization

The crystallographic structures of pristine g-C₃N₄ and the ZnFe₂O₄@g-C₃N₄ composite were analyzed via X-ray diffraction (XRD). As illustrated in Fig. 1, the XRD pattern of ZnFe₂O₄@g-C₃N₄ exhibits distinct diffraction peaks corresponding to both g-C₃N₄ and ZnFe₂O₄ phases, confirming the coexistence of the two components. For pristine g-C₃N₄, two characteristic peaks were observed at 13.1° and 27.5°, indexed to the (001) and (002) crystallographic planes, respectively. These reflections arose from the in-plane structural packing of tri-s-triazine units and the interlayer stacking of conjugated aromatic systems, consistent with the typical graphitic carbon nitride framework (JCPDS 87–1526)10,11.

Fig.1
figure 1

The XRD patterns of samples g-C3N4 and ZnFe2O4@g-C3N4.

In the composite, additional diffraction peaks at 2θ values of 18°, 30.2°, 35.6°, 36.9°, 43.3°, 45°, 53.7°, 57.3°, and 62.8° were assigned to the (111), (220), (311), (222), (400), (331), (422), (511), and (440) planes of cubic spinel ZnFe₂O₄ (JCPDS 01–070–6490)12,13. Notably, these peaks displayed slight angular deviations compared to the standard reference values. These systematic peak shifts were attributed to lattice distortion in ZnFe₂O₄ induced by interfacial electronic interactions at the heterojunction with g-C₃N₄. Such lattice parameter modifications—calculated via Bragg’s law (nλ = 2 dsinθ) to reflect a unit cell contraction—provided definitive evidence of strong electronic coupling between ZnFe₂O₄ and g-C₃N₄, ruling out mere physical mixing. The coexistence of these distinct diffraction features confirmed the successful formation of a heterostructure, where ZnFe₂O₄ nanoparticles were anchored onto the g-C₃N₄ matrix without disrupting its layered architecture. These results validated the effective synthesis of a phase-pure ZnFe₂O₄@g-C₃N₄ composite, laying a foundation for its enhanced photocatalytic functionality.

The heterojunction ZnFe₂O₄@g-C₃N₄ photocatalysts were well synthesized and crystallized in nanomaterials. The size of ZnFe₂O₄ nanoparticles which loaded on the surface of the g-C3N4nanosheets were calculated according the Scherrer equation26:

$$D\, = \,\frac{k\lambda }{{\beta \cos \theta }}$$
(3)

where the parameter D, k, λ, β and θ were defined as particle size, Scherrer constant (0.89), X-ray wavelength (0.15418 nm), full width at half maximum and angle at maximum, respectively. The size of the ZnFe₂O₄ on the g-C3N4 were calculated as 22.31 nm and 21.13 nm according the characteristic peak which located at the crystal planes (113) of red and blue curves in Fig. 1. The calculated particle size of ZnFe₂O₄ (22.31 nm) nanoparticles distributed on the g-C₃N₄ surface aligns with the SEM (20–30 nm) and TEM (10–27.5 nm) analysis results, confirming structural consistency between theoretical models and experimental observations.

The blue curve represented the used ZnFe₂O₄@g-C₃N₄ in the photocatalytic degradation process. Throughout the experiment, the diffraction peaks remained essentially unchanged, with the exception of their intensity. The consistent diffraction peak positions before and after the reaction signify that the crystal structures of g-C₃N₄ and ZnFe₂O₄ were unmodified. The attenuation of ZnFe₂O₄'s diffraction peaks could likely be attributed to variations in preferred orientation, structural impairment caused by photocorrosion, or modifications in content and dispersibility. Conversely, g-C₃N₄ exhibited relatively high stability, leading to negligible changes in its peak intensity.

Morphological and microstructural analysis

The morphological evolution and interfacial characteristics of pristine g-C₃N₄, ZnFe₂O₄ and the ZnFe₂O₄@g-C₃N₄ composite were investigated via scanning electron microscopy (SEM) and transmission electron microscopy (TEM). As depicted in Fig. 2(a), the thermal polymerization of urea and melamine yielded g-C₃N₄ with a lamellar morphology characterized by pronounced wrinkling and sheet-like stacking, a hallmark of its graphitic architecture. The ZnFe₂O₄ were approximate cube particle and diameter dispersed from 85 to 120 nm in Fig. 2(b) and 2(d). Upon integration with ZnFe₂O₄ (Fig. 2c), the composite retained the layered framework of g-C₃N₄ but exhibited reduced lateral dimensions of the individual sheets, likely due to fragmentation during hydrothermal processing. Crucially, ZnFe₂O₄ nanoparticles (20–30 nm) were uniformly dispersed across the g-C₃N₄ matrix without agglomeration, confirming the successful formation of an intimate heterointerface between the two phases. This structural synergy was anticipated to enhance charge carrier separation and surface reactivity, thereby augmenting photocatalytic efficiency.

Fig.2
figure 2

The SEM images of samples g-C3N4, ZnFe2O4 and ZnFe2O4@g-C3N4.

Further insights into the microstructural features were obtained through TEM (Fig. 3(a)–(d)). Pristine g-C₃N₄ displayed a highly porous, crumpled 2D structure with abundant in-plane voids (Fig. 3(a)), attributed to the release of gaseous byproducts NH₃ during thermal condensation. These mesopores (5–15 nm diameter) not only increase the material’s specific surface area but also facilitate reactant diffusion and active site accessibility. The ZnFe₂O₄ were polycrystalline structure and diameter dispersed from 80 to 100 nm in Fig. 3(b). In the ZnFe₂O₄@g-C₃N₄ composite (Fig. 3(c)), the g-C₃N₄ sheets maintained their layered topology, while ZnFe₂O₄ nanoparticles were anchored uniformly across the surface. As shown in Fig. 3(d), the diameter of ZnFe₂O₄ dispersed 10 to 27.5 nm. Upon analyzing the reason for the reduction in the particle size of ZnFe₂O₄, it was mainly attributed to the fact that the porous and curled structures of g-C₃N₄ restricted the growth of ZnFe₂O₄. Consequently, compared to pure ZnFe₂O₄ particles, the particle size was notably smaller.

Fig. 3
figure 3

The TEM images of samples g-C3N4, ZnFe2O4 and ZnFe2O4@g-C3N4.

High-resolution TEM (Fig. 4) revealed lattice fringes corresponding to the (220) and (311) plane of cubic ZnFe₂O₄ and interplanar spacing was 0.2787 and 0.2426 nm, corroborating the coexistence of both phases without interfacial contamination. The absence of particle aggregation and the coherent integration of ZnFe₂O₄ within the g-C₃N₄ scaffold underscored the efficacy of the synthesis strategy in fostering a well-defined heterostructure, a critical determinant of enhanced catalytic performance.

Fig. 4
figure 4

The HRTEM images of ZnFe2O4@g-C3N4.

Nitrogen adsorption–desorption analysis

The textural properties of the ZnFe₂O₄@g-C₃N₄ composite were evaluated through nitrogen adsorption–desorption measurements. As depicted in Fig. 5(a), the composite exhibited a type IV isotherm with an H3 hysteresis loop, characteristic of mesoporous materials featuring slit-like pores formed by platelet aggregates. A sharp uptake at high relative pressure (P/P₀ > 0.95) signified the coexistence of macropores, attributed to the volatilization of ammonia gas during the thermal polymerization of g-C₃N₄ precursors. The Brunauer–Emmett–Teller (BET) specific surface area of the g-C₃N₄ was calculated as 855.9 m2·g⁻1, with reduced surface areas of 654.2, 358.4, 37.9, 29.2, 23.2, 20.22, and 14.1 m2·g⁻1 observed under increased ZnFe₂O₄. According to nitrogen adsorption–desorption analysis, the ZnFe₂O₄@g-C₃N₄ composite exhibited a significant reduction in specific surface area with increasing ZnFe₂O₄ loading. This decrease can be attributed to the partial occupation of the porous g-C₃N₄ framework by ZnFe₂O₄ nanoparticles. However, the formation of a well-defined ZnFe₂O₄/g-C₃N₄ heterojunction became more prominent at higher ZnFe₂O₄ content, as evidenced by the concomitant rise in catalytically active sites. While the pore-blocking effect of ZnFe₂O₄ diminished the surface area, the enhanced interfacial charge transfer and increased density of reactive sites at the heterojunction interface counterbalanced this limitation. The interplay between these competing factors—surface area reduction and active site enrichment—culminated in the ZnFe₂O₄@g-C₃N₄−3 composite demonstrating optimal catalytic performance, highlighting the critical role of heterojunction engineering in optimizing activity despite structural trade-offs.

Fig. 5
figure 5

The absorption curves of samples ZnFe2O4@g-C3N4.

Pore size distribution derived from the Barrett-Joyner-Halenda (BJH) model (Fig. 5(b)) reveals a bimodal architecture dominated by mesopores (2.5–10 nm, average diameter: 3.4–5.6 nm) and subsidiary macropores (10–100 nm). The mesopores originate from interparticle voids within the aggregated g-C₃N₄ layers, while macropores arose from gas evolution during synthesis. Such hierarchical porosity facilitated efficient mass transport of reactants and access to catalytic sites, synergistically enhancing degradation kinetics. These structural attributes—high surface area, dual-scale porosity, and interfacial connectivity—underscored the ZnFe₂O₄@g-C₃N₄ composite’s suitability for advanced photocatalytic applications.

Surface elemental and chemical state analysis

The chemical composition and interfacial interactions within the ZnFe₂O₄@g-C₃N₄ heterostructure were probed via X-ray photoelectron spectroscopy (XPS). The survey spectrum (Fig. 6(a)) confirms the coexistence of oxygen (O), nitrogen (N), carbon (C), zinc (Zn), and iron (Fe), corroborating the composite’s hybrid nature. High-resolution spectra were deconvoluted to elucidate bonding configurations and oxidation states. In O 1 s Spectrum (Fig. 6(b)), the O 1 s envelope resolves into four components at 529.75, 530.95, 531.45, and 531.95 eV. Peaks at 529.75 and 530.95 eV are attributed to Zn–O–Fe coordination in the spinel ZnFe₂O₄ lattice, while contributions at 531.45 and 531.95 eV correspond to surface-adsorbed hydroxyl (–OH) and carboxyl (–HO–C = O) groups, indicative of oxygen-containing functional moieties. In N 1 s Spectrum (Fig. 6(c)), the N 1 s profile exhibits three distinct binding energies at 398.55, 399.00, and 399.55 eV. The dominant peak at 398.44 eV arises from C–N–C coordination in the tri-s-triazine units of g-C₃N₄, while contributions at 399.00 and 399.55 eV correspond to sp2-hybridized nitrogen (N–(C)₃) and terminal amino groups (–NH₂), respectively, confirming the integrity of the g-C₃N₄ framework. In C 1 s Spectrum (Fig. 6(d)), deconvolution of the C 1 s signal reveals four components: (i) adventitious carbon (C = C/C–C, 284.95 eV), (ii) Zn–C bonds (284.55 eV) associated with oxygen vacancies, (iii) graphitic sp2 carbon (285.45 eV), and (iv) a prominent peak at 288.1 eV assigned to N–C = N coordination in the aromatic triazine rings of g-C₃N₄. In Fe 2p Spectrum (Fig. 6(e)), the Fe 2p region displays spin–orbit doublets for Fe 2p₃/₂ (710.56 eV) and Fe 2p₁/₂ (724.66 eV), accompanied by a satellite peak at 718.96 eV. The Fe 2p₃/₂ peak splits into two components at 710.56 eV (Fe3⁺ in octahedral sites) and 712.36 eV (Fe3⁺ with ligand field effects), confirming the dominance of Fe3⁺ in the ZnFe₂O₄ lattice. The absence of Fe2⁺ signatures (typically < 709 eV) underscores the stability of the spinel structure. In Zn 2p Spectrum (Fig. 6(f)), the Zn 2p spectrum exhibits symmetric peaks at 1021.92 eV (Zn 2p₃/₂) and 1045.02 eV (Zn 2p₁/₂), characteristic of Zn2⁺ in tetrahedral coordination within ZnFe₂O₄. The 23.1 eV spin–orbit splitting further validates the + 2 oxidation state of Zn. The XPS analysis confirms the coexistence of ZnFe₂O₄ and g-C₃N₄ phases with interfacial Zn–C and Fe–O–N bonding, indicative of strong electronic coupling. This synergy, coupled with oxygen vacancies and surface functional groups, underpins the composite’s enhanced photocatalytic activity.

Fig. 6
figure 6

X-ray photoelectron spectrum of ZnFe2O4@g-C3N4.

Optical property

The optical absorption characteristics of g-C₃N₄ and ZnFe₂O₄@g-C₃N₄ nanocomposites were analyzed using ultraviolet–visible diffuse reflectance spectroscopy (UV–vis DRS). As illustrated in Fig. 7(a), pure g-C₃N₄ exhibited an absorption edge within the visible light spectrum. Upon incorporation of ZnFe₂O₄ nanoparticles onto the g-C₃N₄ surface, the composite demonstrated a pronounced red shift in its absorption edge, accompanied by a significant enhancement in absorption intensity across the visible to near-infrared (Vis–NIR) regions. This shift indicates extended light-harvesting capabilities. The optical band gaps (Eg) of the synthesized photocatalysts were determined via the Tauc plot method, employing the equation for direct band gap semiconductors42,43,44,45:.

$$\left( {\alpha {\text{h}}\nu } \right)^{{2}} \, = \,{\text{B}}\left( {{\text{h}}\nu - {\text{Eg}}} \right)$$
(4)
Fig. 7
figure 7

UV–vis–NIR diffuse reflectance spectra of ZnFe2O4@g-C3N4,(b) corresponding Tauc plots of (αhν)2 versus the photon energy (hν) of ZnFe2O4@g-C3N4.

where α, hν, Eg, and B represent the absorption coefficient, photon energy, band gap energy, and a proportionality constant, respectively. As shown in Fig. 7, the calculated Eg values for g-C₃N₄ and ZnFe₂O₄@g-C₃N₄ composites were 2.6067 eV (pure g-C₃N₄) and 2.0418 eV, 2.5994 eV, 2.5611 eV, 2.5282 eV, 1.8976 eV, 1.8926 eV, and 1.8903 eV (ZnFe₂O₄@g-C₃N₄), respectively. The progressive reduction in Eg with increasing ZnFe₂O₄ content confirmed band structure modulation. The UV–vis-NIR DRS spectra further revealed that the formation of a p-n heterojunction between g-C₃N₄ and ZnFe₂O₄ markedly improved optical absorption under Vis–NIR irradiation. This enhanced absorption range promotes more efficient utilization of solar energy compared to pristine g-C₃N₄, suggested superior photocatalytic activity for the ZnFe₂O₄@g-C₃N₄ nanocomposites in Vis–NIR regions.

Photoluminescence (PL) spectroscopy was employed to evaluate the electron–hole separation efficiency of ZnFe₂O₄@g-C₃N₄ composites in a pure aqueous system11,12,13,14,15,16. As depicted in Fig. 8, the PL spectra of the composites revealed a progressive suppression of emission peak intensity with increasing ZnFe₂O₄ content. This trend was attributed to the reduced recombination probability of photoinduced charge carriers, as PL emission originates from the radiative recombination of excited electrons and holes. The peak intensities followed the order: ZnFe₂O₄@g-C₃N₄−0 > ZnFe₂O₄@g-C₃N₄−1 > ZnFe₂O₄@g-C₃N₄−2 > ZnFe₂O₄@g-C₃N₄−3 > ZnFe₂O₄@g-C₃N₄−4 > ZnFe₂O₄@g-C₃N₄−5 > ZnFe₂O₄@g-C₃N₄−6 > ZnFe₂O₄@g-C₃N₄−7. This systematic decrease in intensity underscores the role of the ZnFe₂O₄/g-C₃N₄ heterostructure in facilitating charge separation, likely through interfacial electric field effects or staggered band alignment. Consequently, the inhibited recombination kinetics correlated with enhanced availability of free charge carriers for surface redox reactions. These results confirmed that the ZnFe₂O₄@g-C₃N₄ composites exhibited superior photocatalytic activity compared to pristine g-C₃N₄, driven by efficient electron–hole separation and prolonged carrier lifetimes under illumination.

Fig. 8
figure 8

PL spectra of samples ZnFe2O4@g-C3N4.

Photocatalytic performance

The photocatalytic activity of the ZnFe2O4@g-C3N4 heterostructure was rigorously assessed via visible-light-driven degradation of methylene blue (MB), a model organic pollutant27,28. As depicted in Fig. 9, time-resolved ultraviolet–visible (UV–Vis) spectroscopy demonstrated a monotonic decline in the characteristic absorbance intensity of MB at λ = 664 nm as a function of irradiation duration, with the signal diminishing to near-background levels after prolonged exposure. The absence of hypsochromic or bathochromic shifted in the primary absorption band, coupled with no detectable emergence of secondary absorption features within the spectral range (400–800 nm), strongly indicates the complete mineralization of MB rather than transient intermediate formation or structural isomerization. These observations unequivocally validate the robust photocatalytic efficacy of the ZnFe2O4@g-C3N4 composite, highlighting its capacity for efficient visible-light harvesting and redox-driven degradation of organic contaminants.

Fig. 9
figure 9

The changed absorption peak of MB with visible light irradiated.

The photocatalytic degradation of methylene blue (MB) by ZnFe₂O₄@g-C₃N₄ under visible light irradiation is governed by the generation of reactive oxygen species (ROS), notably hydroxyl radicals (·OH) and superoxide anions (·O₂⁻), facilitated by the heterojunction’s electronic structure27,28. As illustrated in Fig. 10(a), the degradation efficiency correlates with ZnFe₂O₄ doping concentration, achieving optimal performance at 74.3 wt% loading. Under dark conditions (Fig. 10(a), black curve), the composite exhibits substantial adsorption of MB molecules due to its mesoporous g-C₃N₄ framework, yet no degradation occurs in the absence of light. Upon visible-light irradiation, photogenerated electrons (e⁻) and holes (h⁺) are formed, with the heterojunction interface promoting efficient charge separation. This suppresses recombination, enabling prolonged ROS generation and rapid MB decomposition. Exceeding the optimal ZnFe₂O₄ loading (> 74.3 wt%) diminishes performance due to nanoparticle aggregation, which obstructs the porous g-C₃N₄ layers, reduces active site accessibility, and impedes dye-catalyst contact. Kinetic analysis (Fig. 10(c), Table 2) confirms pseudo-first-order behavior, with rate constants peaking at 74.3 wt% (0.12697 min⁻1) and declining thereafter. The synergy between g-C₃N₄’s adsorption capacity and ZnFe₂O₄’s visible-light activation is critical for maximizing degradation efficiency.

Fig. 10
figure 10

The changed catalytic performance with visible light irradiated.

Table 2 The kinetic coefficients of catalysts under different condition.

The introduction of H₂O₂ (0.5 mL, 30%) amplifies catalytic activity via a photo-Fenton mechanism (Fig. 10(b) and (d)), where H₂O₂ reacts with photogenerated electrons to yield additional ·OH radicals. This dual catalytic pathway achieves complete MB degradation within 40 min, with kinetic coefficients increasing by 12-fold at 59.1 wt% ZnFe₂O₄ (Table 2). However, excessive doping (> 59.1 wt%) under H₂O₂ conditions induces shielding effects, wherein dense ZnFe₂O₄ layers hinder H₂O₂ diffusion and ROS generation, underscoring the necessity of balanced compositional design. The performance comparison between the ZnFe2O4@g-C3N4 material and reported catalysts was presented in Table 3. As is evident from the table, the photocatalytic performance of ZnFe2O4@g-C3N4 outperforms that of most of the reported photocatalysts.

Table 3 Comparison of catalytic efficiency of ZnFeO4@g-C3N4 catalyst with previous literature for the reduction of MB.

A above analysis, the photocatalytic performance of the ZnFe₂O₄@g-C₃N₄ composites exhibited an optimal threshold when an equilibrium between specific surface area and active site density was achieved. During the initial reaction stage, the degradation efficiency remained limited due to the high initial dye concentration and insufficient generation of photoinduced reactive species. As the reaction progressed, the accumulation of reactive species significantly increased their collision frequency with dye molecules, thereby enhancing the degradation kinetics. Notably, the density of these reactive species was directly modulated by the ZnFe₂O₄ loading within the composite. As demonstrated in Fig. 10, the ZnFe₂O₄@g-C₃N₄−3 composite displayed superior photocatalytic activity, which originated from a synergistic effect arising from two competing factors: (i) the formation of an efficient ZnFe₂O₄/g-C₃N₄ heterojunction, which facilitated interfacial charge separation and amplified reactive species generation, and (ii) the retention of sufficient surface accessibility despite partial pore occlusion by ZnFe₂O₄ nanoparticles. This balance between heterojunction-driven electronic enhancement and structural porosity underscores the critical role of compositional optimization in maximizing photocatalytic performance.

Photocatalytic active agent

To elucidate the reactive species governing the photocatalytic degradation mechanism, radical scavenging experiments were conducted under visible light irradiation11,27,28,29,30. The active species photogenerated holes (h⁺), hydroxyl radicals (·OH), and superoxide anions (·O₂⁻) were systematically investigated using targeted quenchers: p-benzoquinone (BQ, ·O₂⁻ scavenger), tert-butanol (TBA, ·OH scavenger), and disodium ethylenediaminetetraacetate dihydrate (EDTA-2 Na, h⁺ scavenger). As depicted in Fig. 11(a), the degradation efficiency of methylene blue (MB) by ZnFe₂O₄@g-C₃N₄−3 was significantly attenuated in the presence of these inhibitors.

Fig. 11
figure 11

Elemental trapping experiment, recycled degradation rate and Vsm of catalysis.

The degradation rate declined from 99.99% (pristine system) to 81.12%, 73.11%, and 82.52% upon introduction of BQ, TBA, and EDTA-2 Na, respectively, over 40 min. The pronounced suppression of activity with TBA (73.11% remaining MB) underscores ·OH as the predominant reactive species, attributable to its potent oxidative capacity. Concurrently, the inhibition by BQ (81.12% residual MB) and EDTA-2 Na (82.52% residual MB) confirms the ancillary roles of ·O₂⁻ and h⁺ in the degradation pathway. These findings align with the heterojunction’s electronic structure, which promotes charge separation, enabling h⁺ to directly oxidize MB or react with H₂O to generate ·OH, while ·O₂⁻ forms via oxygen reduction by photogenerated electrons. This study conclusively identifies ·OH as the primary active species, with synergistic contributions from h⁺ and ·O₂⁻, underpinning the composite’s robust photocatalytic performance.

Recyclability and stability

The reusability and structural stability of the ZnFe₂O₄@g-C₃N₄−5 catalyst were evaluated through successive degradation cycles under consistent experimental conditions23,32,35. As illustrated in Fig. 11(b), the composite retained > 95% of its initial degradation efficiency after ten reuse cycles, demonstrating robust operational durability. As shown in Fig. 11(c), the material’s inherent ferromagnetism, derived from ZnFe₂O₄, enabled facile magnetic recovery using an external magnetic field, circumventing secondary pollution risks associated with conventional filtration methods. The marginal efficiency decline is attributed to partial active site deactivation via adsorbed intermediates, rather than structural degradation. These results underscore the catalyst’s viability for sustainable wastewater treatment, balancing high recyclability with minimal performance attenuation. The catalysts was recycled by Neodymium magnet after degradation of MB in Fig. 11(c). The recovery rate of the neodymium magnet-derived catalyst was only 70%, indicating a relatively low efficiency. Analytical results revealed two primary causes: first, partial destruction of the zinc ferrite (ZnFe₂O₄) crystal structure after the degradation reaction led to the loss of magnetic properties; second, the small particle size of the catalyst, combined with the viscous force of the solution post-reaction, hindered the effective separation of catalyst components. As a result, centrifugation remained the adopted method for catalyst recovery in the experiments.

Catalytic mechanism

The experimental data collectively demonstrate that the ZnFe₂O₄ − C₃N₄ heterojunction photocatalyst efficiently generates hydroxyl radicals (·OH) through the photochemical decomposition of H₂O₂ under visible light irradiation4,5,6,7,8,35,37. This process markedly enhances the separation of photogenerated electron–hole pairs while suppressing charge recombination, as evidenced by the progressive decline in photoluminescence (PL) intensity with increasing ZnFe₂O₄ loading on the g-C₃N₄ surface (Fig. 8). The formation of heterojunction between ZnFe₂O₄ nanoparticles (NPs) and g-C₃N₄ facilitates directional charge transfer, thereby amplifying photodegradation efficiency. Mechanistic studies confirm that the primary reactive oxygen species (ROS)—·OH, superoxide radicals (·O₂⁻), and photogenerated holes (h⁺)—act synergistically to drive pollutant degradation (Fig. 11b). As illustrated in Fig. 12, the photocatalytic mechanism involves the following cascade: 1) Charge Separation-Upon visible light absorption (h⁺), electrons (e-) are excited from the valence band (VB) of g-C₃N₄ to its conduction band (CB), leaving h⁺ in the VB (Eq. 1). 2) Interfacial Electron Transfer-The staggered band alignment between g-C₃N₄ and ZnFe₂O₄ promotes e- migration from g-C₃N₄ to ZnFe₂O₄ (Eq. 2), where e- reduce adsorbed O₂ to generate ·O₂⁻. 3) ROS Generation-Concurrently, h⁺ in the VB of g-C₃N₄ oxidize H₂O or surface − OH groups to yield ·OH. ·O₂⁻ undergoes protonation to form hydroperoxyl radicals (·OOH), which further react with e- to produce H₂O₂ (Eq. 3). 4) Fenton-like Activation—H₂O₂ is catalytically decomposed via Fe2⁺/Fe3⁺ redox cycles in ZnFe₂O₄, releasing additional ·OH (Eq. 4). 5) Pollutant Mineralization-The synergistic action of ·OH, ·O₂⁻, and h⁺ degrades methylene blue (MB) through demethylation, aromatic ring cleavage, and ultimate mineralization into CO₂, H₂O, and inorganic ions (NH₄⁺/NO₃⁻) (Eq. 5)12,49.

Fig. 12
figure 12

Visible light absorption, charge transfer and schematic diagram of degraded methylene blue by ZnFe2O4@g-C3N4.

The composite’s mesoporous architecture enhances MB adsorption, concentrating dye molecules near ROS-active sites, while the heterojunction’s optimized charge separation minimizes e--h⁺ recombination. This dual functionality—adsorption enrichment and ROS amplification—ensures rapid degradation kinetics and complete pollutant mineralization. Together, these attributes position the ZnFe₂O₄@g-C₃N₄ heterojunction as a sustainable, high-performance photocatalyst for industrial wastewater remediation, with scalability and magnetic recoverability further bolstering its practical viability.

Conclusion

In this study, a ZnFe₂O₄@g-C₃N₄ heterojunction photocatalyst was synthesized via a hydrothermal method. By virtue of its porous multilayer heterojunction interface design, the catalyst achieves efficient photogenerated charge separation and broad-spectrum light absorption. Coupled with a dual-path degradation mechanism—combining photocatalysis and Fenton-like processes (with hydroxyl radicals (·OH) as the dominant active species—the material demonstrated exceptional degradation performance, achieving a 99.99% removal efficiency for methylene blue within 40 min. The reaction rate constant surpassed those of most reported catalysts. Notably, the intrinsic ferromagnetism of ZnFe₂O₄ enabled facile magnetic recovery of the catalyst (retaining > 95% efficiency after 10 cycles). The composite exhibits significant advantages, including cost-effectiveness, facile synthesis, and exceptional stability. Its dual-mechanism synergy (photocatalytic and Fenton-like pathways) highlights its potential for industrial wastewater treatment and environmental remediation, particularly in the degradation of organic pollutants. Furthermore, the heterojunction design strategy proposed here offers a universal framework for developing other visible-light-driven photocatalysts. While further validation is required to assess its efficacy toward complex pollutant systems and complete mineralization pathways, this work provides an innovative and sustainable solution for advanced environmental governance.