© 2018, © 2018 Informa UK Limited, trading as Taylor & Francis Group. The present study concerns the methodology for the successful synthesis of galactomannan/ZnO (GM/ZnO) nanocomposite using an in situ chemical co-precipitation route utilizing galactomannan as a nanoreactor. The galactomannan was isolated using a hydrothermal extraction from mezquite (Prosopis spp.) seeds, in which the tree represents a valuable resource for the habitants of arid and semiarid zones of Mexico. The GM/ZnO was synthesized at room temperature. The effects of changing the galactomannan concentration in the nanocomposite over the antibacterial activity against Escherichia coli and Staphylococcus aureus were investigated by microdilution broth method. The GM/ZnO with greatest antibacterial activity was the one with the lowest amount of galactomannan and it was characterized. The ZnO nanoparticles that were observed by SEM and TEM, showed the formation of ZnO nanoparticles, with flake/petal shape and wurtzite structure. The synthesis of nanocomposite was confirmed by FTIR, with strong interactions between the primary alcohol of the galactomannan and ZnO. The thermal stability and decomposition was determined by TGA and DSC, finding a greater thermal stability and an increase of the degradation temperature. A mechanism for the synthesis of GM/ZnO, as well as the formation model of the ZnO with the assistance of the galactomannan are proposed.