In this study, an operative technique was presented for the synthesis of the magnetically separable γ-Fe2O3@SiO2@ZIF8@Ag photocatalyst. The synthesized nanostructures were identified using various structural analyses, including XRD, EDX/SEM, FTIR, bandgap, and VSM. Their ability to remove norfloxacin (NOR) was then examined by studying the effects of various parameters, including photocatalyst dose, solution pH, initial NOR concentration, and reaction time. The results showed that the catalyst had the best performance, with an efficiency of 100% under UV light and 96.2%unnder visible light, at a catalyst dose of 0.4 g/L and a reaction time of 45 min. Stability tests also showed that the synthesized photocatalyst maintained its proper performance after five cycles, and its efficiency was reduced by only 4.5%. Also, a comparison between the adsorption and the photocatalytic process showed that the adsorption process removed only 42% of NOR after 60 min, whereas the photocatalytic process, under both visible and UV light irradiation, was able to eliminate 100% of NOR in the same time period. The results showed that the degradation kinetics follow the first-order kinetic model. The reaction rate constants using UV and visible lamps were 0.082 and 0.056 min− 1, respectively, which indicates the degradation rate for UV light is 1.46 times higher compared to visible light. Also, the half-life times for the process with UV and visible light were 8.4 and 12.3 min, respectively. The average oxidation state (AOS) and carbon oxidation state (COS) of the process increased over time, indicating good degradation of NOR and conversion of non-biodegradable wastewater into biodegradable wastewater. Reactive oxygen species (ROS) assays showed that hydroxyl radicals and holes have the main role in the degradation process. Therefore, the proposed photocatalysts can be considered suitable, cost-effective, and reusable for the treatment of hospital wastewater.