Fluorescent inks have been emerged as a desirable encoding technique to enhance anticounterfeiting printing of commercial goods. However, significant drawbacks with fluorescent inks, such as poor durability, low efficiency, and high cost. Herein, we describe the preparation of a self-healing authentication ink based on carboxymethyl cellulose (CMC) hydrogel immobilized with nitrogen-doped carbon dots (NCD) nanoparticles (NPs) for cutting-edge anticounterfeiting applications. Security inks that self-heal are very durable. Under ambient conditions, the prepared NCD@CMC hydrogel could self-heal with a high healing efficiency. It might stick to diverse surfaces such as plastic, glass and paper sheets. The self-healing composite ink demonstrated outstanding photostability under UV light. Straightforward and environmentally friendly method was applied on the agricultural waste of rice straw toward the production of NCD using hydrothermal carbonization in an aqueous medium, and in the presence of NH4OH as an inexpensive passivating agent. The quantum yield (QY) for NCD reached 24.09 %. Various concentrations of NCD NPs were employed to produce self-healable nanocomposite inks with a variety of emission properties. Stamping homogeneous films onto paper surfaces produced a transparent layer. The CIE Lab and emission spectra of prints independently verified the capability of NCD nanocomposite inks to vary their color to blue under UV illumination. To measure the particle diameter of the prepared NCD, their morphological characteristics were examined by transmission electron microscopy (TEM) to indicate diameters of 10–25 nm. Utilizing various analytical techniques, the morphology and chemical composition of the fluorescent prints were examined. We examined the mechanical qualities of the stamped papers as well as the rheological characteristics of the ink hydrogel. Due to their colorless appearance, the excitation band of the printed films was peaked at 364 nm, while their emission was peaked at 465 nm. The current smart ink holds high potential for numerous applications like smart packaging and authentication, and shows great promise as a practical and mass production approach for easily creating anticounterfeiting stamps.