Antimicrobial active packing has demonstrated great potential in extending food shelf life. However, developing new intelligent and responsive antimicrobial strategies is still desirable. Here, a 2-hydroxy-4-methoxybenzaldehyde (HMB)-decorated chitosan film (HDCF) via surface Schiff-base coupling is designed. HDCF shows excellent storage stability and pH-responsive release, enabling a switch in antimicrobial mode from "defense" to "attack" under acid conditions. Before HMB release, HDCF exhibits broad spectrum antifungal adhesion capabilities against Penicillium citrinum, Penicillium chrysogenum and Aspergillus niger, and antibacterial adhesion capabilities against Staphylococcus aureus. Under acidic conditions, with HMB release, HDCF displays enhanced release-antifungal performance against A. niger, P. citrinum and Candida albicans and release-antibacterial performance against S. aureus. In addition, HDCF is effective in food preservation for cherry tomatoes and tomato juice and has good UV barrier properties. Therefore, this HDCF provides a new path for diversiform antimicrobial designs in the new generation of food packaging.