Background Glass ionomer cement (GIC) plays a vital role in dental restorative procedures, serving purposes such as filling, luting, and adhesion. However, its inadequate mechanical properties pose challenges, especially in areas experiencing significant stress. To overcome this limitation, nanohydroxyapatite (nHA), known for its bioactive phosphate content, is added to the GIC at specific concentrations to improve its properties. Aim We aim to evaluate the antimicrobial property and compressive strength of green-mediated nHA-incorporated GIC. Material and methods Green synthesis of hydroxyapatite nanoparticles was prepared using Moringa oleifera extract in a solvent form and eggshell waste served as the calcium source. These nHApowders were then integrated into the GICat varying concentrations (3%, 5%, and 10%) designated as Group I, Group II, and Group III, respectively, while Group IV (control) consisted of conventional GIC. Specimens were fabricated and subjected to chemical structure analysis through Fourier transform infrared spectroscopy (FTIR), energy dispersive X-ray (EDX), and scanning electron microscopy (SEM). The antimicrobial activity and compressive strength of all groups were investigated. The antimicrobial activity against Streptococcus mutans and Lactobacillus was evaluated through the minimum inhibitory concentration (MIC) test, while compressive strength was evaluated by measuring the maximum force endured by the specimen before fracturing. Data analysis utilized IBM SPSS Statistics software, employing repeated measures ANOVA to determine mean MIC values and compressive strength, with Tukey's posthoc test for pairwise comparisons. Results The results of the study showed that the antimicrobial efficacy of nHA GIC improved with increasing weight percent (% wt) of the additive, exhibiting significantly enhanced activity against Streptococcus mutans and Lactobacillus compared to the control group (Group IV) with statistical significance (p < 0.05). Moreover, the compressive strength exhibited notable enhancements in the modified groups, including Group I (172.55 ± 0.76), Group II (178.16 ± 0.760), and Group III (182.45 ± 0.950), when compared to the control (162.46 ± 1.606), with statistically significant differences (p < 0.05). Conclusion The study demonstrates that the incorporation of green-mediated nHA-containing GIC results in superior antimicrobial efficacy and compressive strength compared to the control group (Group IV). In particular, the highest concentration of nHA-modified GIC (10%) exhibited the most favorable antimicrobial properties along with increased strength. Therefore, utilizing green-mediated nHA in the GIC shows promise as an effective restorative material. Future investigations should delve into the molecular chemistry and bonding mechanisms to further explore its potential.