Electron donor-acceptor polyimides (PIs) containing different contents of ferrocene (Fc) as the pendent group, were synthesized for electrical resistive memory device applications. The 4,4′-(hexafluoroisopropylidene)diphthalic anhydride (6FDA) was employed as the electron-withdrawing monomer to condensation polymerize with the flexible 4,4′-diaminodiphenyl ether (4,4′-ODA), And the electron-donating 4,4′-diamino-4″-ferrocenyltriphenylamine (DAFcTPA) designed to bear the triphenylamine (TPA) and Fc groups. Semiconductor parameter analysis indicates that the synthesized PIs containing no less than 5mol% of Fc, possess nonvolatile flash memory characteristic with excellent operational stability and transient response to applied voltage. The mechanism related to the electrical switching effect was elucidated through molecular simulation.