In this work, chitosan hydrogel has been synthesized and used to impart pH‐sensitivity and antimicrobial finish to cotton fabric. In order to enhance the incorporation rate of hydrogel, anionic, and cationic activation of the textile surface was applied and then compared. The antibacterial activity of the fabric was then studied. The results revealed an enhancement of the antibacterial activities of the modified fabrics against Escherichia coli, Listeria monocytogene, and Staphylococcus aureus bacteria's. The capacity of material to respond to pH change was studied and confirmed using contact angle method. The anionic fabric treated with hydrogel showed a better pH‐responsiveness. Scanning electron microscopic testing results has also confirmed that the deposition of hydrogel was clearly better with the anionic activation. The characteristics of breathability of the fabrics were analyzed. The results show that the moisture management behavior of the finished materials is significantly better than the control one. Although the permeability to air has reduced by 10%, the permeability to water vapor remained practically unchanged. Furthermore, the effects of the antibacterial finishing on the physical properties of the cotton fabrics were also investigated. It was established that the functionalized samples have changed structure parameters, thickness, air permeability, tensile strength, and resistance to wrinkles. © 2018 Wiley Periodicals, Inc. J. Appl. Polym. Sci. 2018, 135, 46645.