Taking inspiration from the dynamic memory of the human brain, which has the ability to spontaneously forget unimportant information, a universal and straightforward method for creating spatiotemporally regulated hydrogels with electrofluorochromic characteristics that exhibit information "memorizing-forgetting" behavior is presented. The dynamic and reversible electrofluorochromism from blue to red in Eu3+-based hydrogels is achieved by rapid changes in fluorescence triggered by electricity, coupled with the gradual disappearance of fluorescence associated with the mass diffusion ability of the hydrogel. This process involves the generation of H2 from an acidic aqueous solution under electricity, resulting in the conversion of β-diketone derivatives from keto to enol forms and the disruption of hydrogen bonds between ─COOH of polyacrylic acid (PAA) and N of pyridine groups. The dynamic fluorescent and mechanical behavior are facilely tuned by power on time, contents of components, and types of network structures as well as pyridine derivatives. Finally, the hydrogel arrays or films can be utilized for programmable and accurate information encryption, decryption, and self-erasure.