Cutting-edge research in advanced materials is increasingly turning toward the development of novel multifunctional nanomaterials for use in high-tech applications. This research uses the solid-state method as a solvent-free technique to create multifunctional quantum dot (QD) hydroxyapatite (HA) crystals from bovine bone waste. By incorporating cobalt (Co) and magnesium (Mg) into the HA structure, the crystallinity of the hexagonal HA nanoparticles (99.7%), showing QD crystals is enhanced. Oxygen vacancies on the surfaces of the HA nanoparticles contributed to their bandgap falling within the visible light range. In addition, the dopants substituted calcium in the HA crystal structure and generated a divalent oxidation state, shifting the bandgap of natural HA toward red wavelengths (3.26 to 1.94eV). Moreover, the incorporation of Co led to magnetization within the HA structure through spin polarization. Additionally, the doped QD crystals of HA nanoparticles showed significant antimicrobial activity against Escherichia coli, Staphylococcus aureus, and bacteriophages MS2, particularly under visible light exposure. In short, the Co/Mg co-doped HA nanoparticles exhibited ferromagnetic properties, sensitivity to visible light, biocompatibility, and considerable antimicrobial effects, establishing their potential as sustainable multifunctional materials for biomedical applications, especially in anti-infection treatments.