Due to the growing worries about environmental issues, dye degradation is substantial. Besides that, it is essential to prevent illness development by creating cutting-edge antibacterial agents that can inhibit bacterial activities. Herein, we report a novel photocatalyst exhibiting visible light responsivity for the degradation of methyl violet dye and possessing antibacterial properties to mitigating the emergence of drug resistance. It is triple-doped ZnO (Mg, Cu, N-doped ZnO, and Mg, Cu, B-doped ZnO), successfully synthesized by the solid-state method. The structure crystal is hexagonal wurtzite, and the crystal size is 34.68, 30.22, and 29.47 nm for undoped ZnO, (Mg, Cu, N)-doped ZnO, and (Mg, Cu, B)-doped ZnO, respectively, according to the study of X-ray diffraction (XRD), Raman, and SEM results. The (Mg, Cu, N)- and (Mg, Cu, B)-doped ZnO have smaller particle sizes than undoped ZnO. FTIR spectra show Zn-O, Cu-O, Mg-O,and B-O stretching for synthesized samples. The formation of (Mg, Cu, N)-doped ZnO and (Mg, Cu, B)-doped ZnO also were confirmed by EDAX. PL shows the formation of peaks in UV emission (∼350 nm) and visible emission (513–519 nm and ∼646 nm) that indicate the inhibition of electron-hole recombination and oxygen vacancies in the ZnO lattice. The effective photocatalytic activity of undoped ZnO, (Mg, Cu, N)-doped ZnO, and (Mg, Cu, B)-doped ZnO achieves 80.89 %, 93.41 %, and 92.18 % decolorization of water pollutant methyl violet. The antibacterial activities of the three samples are 6.45, 6.00, and 11.90 mm, respectively.