In photocatalytic reactions, the fast recombination rate of photogenerated charge carriers limits practical application. So, in this study, a new g‐C3N4/Bi2S3/NiFe2O4 nanocomposite was synthesized with dual Z‐scheme heterojunctions to enhance charge carrier separation and visible light absorption. The structure, morphology, composition, magnetic, surface potential, and optical properties of the prepared g‐C3N4/Bi2S3/NiFe2O4 nanocomposite were investigated using XRD, FTIR, Raman, FESEM‐EDS‐Mapping, TEM, VSM, Zeta potential, PL, and UV–vis DRS techniques. Also, the photocatalytic performance and mechanism of enrofloxacin (Enro) and malachite green (MG) degradation under visible light were studied. Also, the photocatalytic performance and photodegradation mechanism were studied by enrofloxacin and malachite green degradation under visible light. The effect of the main parameters on the degradation performance of both pollutants was studied by response surface methodology (RSM). Under the optimum conditions, the highest photocatalytic degradation percentages for enrofloxacin and malachite green were obtained at 91.89% and 95.63%, respectively. The apparent rate constants of Enro and MG photodegradation over g‐C3N4/Bi2S3/NiFe2O4 were found to be 0.0628 min−1 and 0.0504 min−1, respectively. Based on its magnetic characteristics, the as‐prepared catalyst demonstrated facile recovery and good photocatalytic stability after six recycling studies, according to the results.