Functional polymeric materials with electrical bi-stable states possess significant potential for high-density data storage due to their nanoscale memory site, three-dimensional-stacking ability and intrinsic flexibility. Aromatic polyimides bearing donor-acceptor (D-A) skeleton could form charge transfer complex (CTC) under electrical field, leading to their feasibility as memory materials. Three novel porphyrinated polyimides DATPP-DSDA, Zn-DATPP-DSDA and Mn-DATPP-DSDA were designed and synthesized for information memory applications. Metal ions with different electron configurations at 3d orbital have a determining influence on memory behaviors of polyimides: nonvolatile write-once-read-many-times memory (WORM) for DATPP-DSDA, volatile static random access memory (SRAM) for Zn-DATPP-DSDA, but no memory performance for Mn-DATPP-DSDA. By comparing the contribution of orbital transition and hole-electron distribution of charge-transfer excited states, roles of metal ions in regulating memory types were discussed. Molecular simulation results indicate that the Zn ion could play a bridge role in paving the route for excited electrons from a D to an A, while a trap role for the Mn ion in hindering this process. This study proves the feasibility of the strategy for modulating the memory behaviors of porphyrinated polyimides by varying the central metal ion and provides the exact effects of various metal ions on regulating charge transfer processes.