The invention describes a usage of a heteroatom doped water-soluble carbon quantum dot serving as a photosensitizer in an antimicrobial material. Various types of heteroatom doped water-soluble carbon quantum dots contain one or more of such heteroatoms as N, S, Si, Se, P, As, Ge, Gd, B, Sb and Te, and the absorption spectrum wavelength of the heteroatom doped water-soluble carbon quantum dot is 300-850 nm. As shown in a research, the heteroatom doped water-soluble carbon quantum dots can efficiently generate active oxygen under the irradiation of visible light, so that the heteroatom doped water-soluble carbon quantum dot has a huge development potential in the application field of photodynamic (PDT) sterilization and disinfection.