Orthopedic bone graft infections are major complications in today’s medicine, and the demand for antibacterial treatments is expanding because of the spread of antibiotic resistance. Various compositions of hydroxyapatite (HAp) in which Calcium (Ca2+) ions are substituted with Cerium (Ce3+) and Magnesium (Mg2+) are herein proposed as biomaterials for hard tissue implants. This approach gained popularity in recent years and, in the pursuit of mimicking the natural bone mineral’s composition, over 70 elements of the Periodic Table were already reported as substituents into HAp structure. The current study aimed to create materials based on HAp, Hap-Ce, and Hap-Mg using hydrothermal maturation in the microwave field. This route has been considered a novel, promising, and effective way to obtain monodisperse, fine nanoparticles while easily controlling the synthesis parameters. The synthesized HAp powders were characterized morphologically and structurally by XRD diffraction, Dynamic light scattering, zeta potential, FTIR spectrometry, and SEM analysis. Proliferation and morphological analysis on osteoblast cell cultures were used to demonstrate the cytocompatibility of the produced biomaterials. The antimicrobial effect was highlighted in the synthesized samples, especially for hydroxyapatite substituted with cerium. Therefore, the samples of HAp substituted with cerium or magnesium are proposed as biomaterials with enhanced osseointegration, also having the capacity to reduce device-associated infections.