Organic polymer based electrical memory devices have attracted significant scientific interest for flexible electronics. However, molecular design principles of polymers with specified memory characteristics on flexible substrates remain challenges. Herein we developed new triphenylamine–pyrene containing donor–acceptor polyimides (PIs) on flexible poly(ethylene naphthalate) (PEN)/Al/PIs/Al cross-point devices, which showed the memory characteristics changing from volatile to nonvolatile via the relative copolymer ratio. The PIs were prepared from the diamines 4,4′-diamino-4′′-methyltriphenylamine (AMTPA) or N,N-bis(4-aminophenyl)aminopyrene (APAP) and the dianhydride 4,4′-(hexafluoroisopropylidene)diphthalic anhydride (6FDA), with relative AMTPA/APAP molar compositions of 100/0, 95/5, 90/10 and 0/100. As the APAP content increased, the memory device characteristics changed from volatile to nonvolatile behavior of flash and write once read many (WORM), since the pyrene moiety could stabilize the radical cation of the APAP moieties. The threshold voltage, ON/OFF ratio, and retention ability were within −3 V, more than 104, and 104 s, respectively. Additionally, the endurance and bending cyclic measurements confirmed that the flexible PI memory devices exhibited excellent reliability and mechanical stability. A possible switching mechanism based on the charge transfer interaction was proposed through molecular simulation and fitted with physical conduction models in OFF and ON states. The manipulation of the memory volatility through tailoring the molecular design and plastic electronic devices demonstrated promising applications of donor–acceptor PIs in integrated memory devices.