The ability to tune afterglow attributes of organic materials can largely extend their utility in the field of lifetime-encoded security applications. Herein, the tuning of afterglow intensity and lifetime of molecule emitters after being doped into copolymer by photoinitiated solvent-free copolymerization are reported. The molar ratio adjustment of 2-hydroxyethyl acrylate and 2-hydroxyethyl methacrylate in copolymerization allows systematic tuning of the rigidity of the resultant copolymers by occupying the free volume through methyl groups, enabling controlled stabilization of the in situ generated triplet excitons of the doped molecule emitters via effectively decreasing vibrational energy dissipation. With the use of this strategy, the green afterglow for 2,3-naphthalenedicarboxylic anhydride can be tuned with a lifetime from 170.1 to 1258.6 ms, accompanied by a 76-fold intensity enhancement. Furthermore, this strategy can be extended to tune multicolor afterglow materials through the choice of molecule dopants. When combined with digital light processing printing, the strategy allows for the facile fabrication of lifetime-encoded complex 3D objects with high precisions for security applications.