The development of new and advanced materials for various environmental and energy applications is a prerequisite for the future. In this research, the removal of hazardous moxifloxacin (MOX) is accomplished by synthesizing new hybrids of MOF-5 i.e., Ni/Mo.S2/MOF-5/GO, Ni.S2/MOF-5/GO, Mo.S2/MOF-5/GO, and Ni/Mo.S2/MOF-5 nanocomposites by using a metal-organic framework (MOF-5) and graphene oxide (GO) as a precursor. The introduction of NixMoxS2 facilitates the unique interfacial charge transfer at the heterojunction, demonstrating a significant improvement in the separation effectiveness of the photochemical electron-hole pairs. To evaluate equilibrium adsorption capacity, time, pH, and concentration of organic pollutants were used as experimental parameters. The adsorption kinetics data reveals pseudo-first-order (R2 = 0.965) kinetics when Ni/Mo.S2/MOF-5/GO photocatalyst was irradiated under light for 90 min against MOX degradation. This led to a narrow energy band gap (2.06 eV in Ni/Mo.S2/MOF-5/GO, compared to 2.30 eV in Ni/Mo.S2/MOF-5), as well as excellent photocatalytic activity in the photodegradation of moxifloxacin (MOX), listed in order: Ni/Mo.S2/MOF-5/GO (95%) > Ni.S2/MOF-5/GO (93%) > Mo.S2/MOF5/GO (90%) > Ni/Mo.S2/MOF-5 (86%) in concentrations up to 2.0 mgL−1, caused by the production of superoxide (O2•−) and hydroxide (OH•) radicals, which encouraged the effective photocatalytic activities of the heterostructure. After five successive tests demonstrating its excellent mechanical stability, the impressive recyclability results for the Ni/Mo.S2/MOF-5/GO revealed only a tiny variation in efficiency from 95% (for the first three runs) to 93% (in the fourth run) and 90% (in the fifth run). These findings show that the heterostructure of Ni/Mo.S2/MOF-5/GO is an effective heterojunction photocatalyst for the quick elimination of moxifloxacin (MOX) from aqueous media.