A novel ZnO nanoparticles aqueous solution was prepared through a one-step reaction between a modified hyperbranched polymer-PNP and zinc nitrate. During the reaction process, PNP not only acted as the reagent to produce ZnO nanoparticles, but also controlled the size of the synthesized ZnO nanoparticles and stabilize them after reaction. The size of ZnO nanoparticles were about 6 nm with narrow size distribution. Then the ZnO nanoparticles were utilized for the functional finishing of cotton fabrics by in situ generation and deposition method. Scanning electron microscope (SEM), energy dispersive X-ray spectroscopy (EDX) and X-ray diffraction (XRD) measurements confirmed the ZnO nanoparticles coated on the cotton fibers. The treated cotton fabrics exhibited excellent UV protective properties and antibacterial activities. When the ZnO content in cotton fabric was 2.23 %, the UPF value of treated cotton fabric reached 114.4 and the bacterial reduction rates againstStaphylococcus aureus(S. aureus) andEscherichia coli(E. coli) both exceeded 98 %.