A strategy centered on dynamically tunable excited-state proton transfer (ESPT) processes is proposed for the design and synthesis of luminescent compounds. An emitter based on guanidine-substituted 1,8-naphthalimide (R-1) with ESPT characteristics has been meticulously engineered. Upon incorporation into poly (methyl methacrylate) (PMMA) matrices, the tunable ESPT process, transitioning between blue and yellow-green emission within the composite film, can be precisely controlled through irradiation in different pH environments. Moreover, the luminescence of the R-1/PMMA composite film exhibits variations in response to environmental changes, and demonstrates excellent fatigue resistance. Exploiting this characteristic, information such as “2020” can be encoded, and this encoded information automatically manifests in response to fluctuations in external pH. Specifically, employing a designated method is essential for accurately deciphering the information. The pH-dependent nature of this feature imparts a higher level of security to the material and offers new insights into information encryption.