The synthesis of functional nanocomposites has become a prominent area of research, driven by the demand for materials with enhanced antibacterial properties. This study presents the synthesis and structural characterization of hydroxyapatite (HA) using basil seed mucilage (BSM) as a sustainable templating agent and incorporated with zeolitic imidazolate frameworks-8 and-67 (ZIF-8 and ZIF-67) for enhanced antibacterial activity. The nanocomposites were evaluated for antibacterial activity, targeting potential biomedical applications. Structural analysis confirmed the successful integration of ZIF-8 and ZIF-67 within the HA framework, with X-ray diffraction (XRD) patterns revealing distinct peaks for HA, ZIF-8, and ZIF-67. Fourier transform infrared (FT-IR) spectroscopy further validated the presence of functional groups corresponding to BSM, HA and the ZIF structures. Nitrogen sorption isotherms indicated a significant increase in specific surface area increase from 17 m2/g for BSM-HA to 107 m2/g for ZIF-8/BSM-HA and 148 m2/g for ZIF-67/BSM-HA, suggesting enhanced adsorption capacity. Antibacterial tests against Bacillus cereus and Pseudomonas aeruginosa revealed inhibition zone diameters of 13-15 mm and 11-12 mm for ZIF-8/BSM-HA and 12-18 mm and 10-11 mm for ZIF-67/BSM-HA, respectively, surpassing those of BSM-HA. Minimum inhibitory concentration values were found to be 16 mg/mL for both ZIF-8/BSM-HA and ZIF-67/BSM-HA, while minimum bactericidal concentration values were greater than 64 mg/mL, indicating their significant antibacterial potential. These results demonstrate that the incorporation of ZIF-8 and ZIF-67 into HA significantly enhances both structural and antibacterial properties, showcasing their potential for improved performance in biomedical applications. The synergistic integration of ZIFs and HA enhances the composites' antibacterial efficacy, broadening their potential utility in various fields. This study underscores the promising role of these novel materials in addressing critical health and sustainability challenges.