In this study, chitosan, polyvinyl alcohol, gelatin, MCM-41 and tea tree oil (TTO) were used as raw materials. MCM-41-based spongy hydrogels loaded with TTO were synthesized by physical cross-linking method. The TTO was first adsorbed into MCM-41 s. Then different contents of MCM-41 s were added to the hydrogel, which affected the properties of the hydrogel. The structure of hydrogels was analyzed by scanning electron microscopy (SEM) and attenuated total internal reflectance Fourier transform infrared spectroscopy (ATR-FTIR). The mechanical properties of hydrogels were determined by swelling, degradation and ductility evaluation. The antibacterial effect and biocompatibility were determined by in vitro antibacterial and cytotoxicity examinations. In this study, the mechanical property of the hydrogels was enhanced with the increasing content of MCM-41 s. The hydrogels exhibited an excellent antibacterial effect attributed to the synergistic interaction between TTO and chitosan. Furthermore, the hydrogels showed superior biocompatibility property. In conclusion, the hydrogels prepared in this study have great potential for expanding their applications in the bacteriostatic field.