In the present study, silver (Ag), magnesium (Mg), and the various molar ratios of Ag:Mg-doped copper oxide nanocomposites (CuO NCs) were synthesized by the co-precipitation method. The CuO NC samples calcined at 500 °C were further analyzed for their morphological, structural, functional, and optical properties. Adding single and dual doping increased the pristine CuO band gap from 1.28 to 1.50 eV. The Ag and Mg metal peaks were revealed in the Fourier transform infrared (FTIR) analysis, while an elevated Mg band was observed in all Mg-doped samples in the Raman results. All CuO NCs showed a monoclinic crystalline structure, flake, and rod-like morphologies. Microbes of Bacillus subtilis, Shigella dysenteriae, and Candida albicans were tested against different concentrations of CuO NCs. Better results for all tested microbes were observed with the 2 mg concentration. The high cytotoxicity effect was observed in the pristine and Cu:Ag (94:6) sample, and other CuO NCs, which demonstrated over 80 % viability in RAW 246.7 cells at a concentration of 0.5 µg/ml. Remarkably, over 94 % cell viability at 0.5 µg/ml was achieved with the Cu:Ag:Mg (94:3:3) NCs ratio, owing to the synergistic effect of the ion-releasing ability of Cu2+, Ag2+, and Mg2+ ions. It possesses a distinctive high aspect ratio shape, is ion-releasing, and has excellent cytocompatibility. The suitability of the Cu:Ag:Mg (94:3:3) NCs ratio for addressing microbial challenges in healthcare is suggested by their distinct characteristics, indicating the promising potential for future biomedical applications.