Water pollution due to organic waste and various microorganisms cause severe health problems. Numbers of techniques are used to eliminate organic waste and microorganisms from water because water pollution is a substantial issue in the current era. In the present study, sustainable and effective CuO/SnO2@g-C3N4 nanocomposites were prepared via green and chemical approach. The photo degradation of ciprofloxacin (CIP) and methylene blue (MB) by the green synthesized nanocomposite were tested. Visible and dark conditions both were used to conduct this test. The results showed that the nanocomposite is much more effective in light than in dark conditions. The synthesized nanocomposite was also tested both in light and dark against highly drug resistant microorganisms’ Bacillus subtilis (B.subtilis) and Escherichia coli (E.coli). As a result, the antibacterial evaluation revealed substantial antibacterial activity in the presence of light, with a zone of inhibition covering an area of 19 (±0.5) mm and 20 (±0.1) mm, respectively, against gram negative and gram positive bacteria such as E. coli and B. subtilis. The results showed that the CuO/SnO2@g-C3N4 nanocomposite is a stable, eco-friendly photocatalyst with significant resistance to CIP and MB degradation and a substantial inhibitory effect towards microorganisms in visible light.