Nature utilizes non-equilibrium self-assembly to achieve remarkable functions. Although such systems have been synthesized, this class of assembly is only sparsely explored in innovative materials with life-like functions. Here, we report transient nanoparticles driven by adenosine triphosphate and their applications on the self-erasable and rewritable security labels. We show that the lifetime of transient nanoparticles can be tuned from a few minutes to hundreds of minutes through adjusting concentrations of the components. By integrating the transient nanoparticles into hydrogels, we achieve self-erasable and rewritable labels with time- and space-encoded information encryption. Notably, a smart Morse code is implemented by programming the hydrogel labels in a spatiotemporal manner. This work provides an emerging material involving transient nanoparticles for information encryption, further accelerating the explorations of the new type information encryption materials.