The main features of early caries are the massive colonization of cariogenic bacteria and demineralization of tooth enamel by the acids that they produce. Owing to the lack of effective treatments, the development of anticaries therapeutics with both antimicrobial and remineralizing properties is urgently required. Black phosphorus nanosheets (BPNs) are ideal therapeutics for the treatment of early caries because they can mediate photothermal antibacterial activity and subsequently promote remineralization by generating PO43−. However, the dynamic and wet environment of the oral cavity prevents the long‐term adhesion of BPNs to the tooth surface. In this study, using catechol‐modified chitosan and PLGA‐PEG‐PLGA as raw materials, a mussel‐inspired versatile hydrogel, BP@CP5, is presented that can be used to physically load BPNs. BP@CP5 has exceptional injectability and can firmly adhere to tooth surfaces for up to 24 h. Upon irradiation, BP@CP5 can quickly eliminate ≈99% of Streptococcus mutans and Streptococcus sanguinis; furthermore, the PO43− generated via degradation also promotes rapid remineralization of enamel slabs. Importantly, the vivo rodent caries modeling results further confirm the excellent caries‐prevention properties of BP@CP5. This study demonstrates that BP@CP5 is a promising anticaries material for caries management.