AbstractIn this work, Sulfur and Nitrogen co-doped carbon nanoparticles (SN-CNPs) were synthesized by hydrothermal method using dried beet powder as the carbon source. TEM and AFM images indicated that these SN-CNPs form a round-shape ball with an approximate diameter of 50 nm. The presence of Sulfur and Nitrogen in these carbon-based nanoparticles was confirmed by FTIR and XPS analyses. These SN-CNPs were found to have strong phosphatase-like enzymatic activity. The enzymatic behavior of SN-CNPs follows the Michaelis–Menten mechanism with greatervmaxand much lowerKmvalues compared toalkaline phosphatase. Their antimicrobial properties were tested onE. coliandL. lactis, with MIC values of 63 μg mL−1and 250 μg mL−1, respectively. SEM and AFM images of fixed and liveE. colicells revealed that SN-CNPs strongly interacted with the outer membranes of bacterial cells, significantly increasing the cell surface roughness. The chemical interaction between SN-CNPs and phospholipid modeled using quantum mechanical calculations further support our hypothesis that the phosphatase and antimicrobial properties of SN-CNPs are due to the thiol group on the SN-CNPs, which is a mimic of the cysteine-based protein phosphatase. The present work is the first to report carbon-based nanoparticles with strong phosphatase activity and propose a phosphatase natured antimicrobial mechanism. This novel class of carbon nanozymes has the potential to be used for effective catalytic and antibacterial applications.Graphical abstractSupplementary InformationThe online version contains supplementary material available at 10.1186/s11671-023-03856-y.