Spatial light modulators (SLMs) exhibited the powerful capability of controlling the electromagnetic wave. They have found numerous applications at terahertz (THz) frequencies, including wireless communication, digital holography, and compressive imaging. However, the development towards largescale, multi-level and multi-functional THz SLM encounters technical challenges. Here, we present an electrically programmable THz metamaterial consisting of an array of 8⊆8 pixels, in which the phase change material of vanadium dioxide (VO 2 ) is embedded. After successfully suppressing the crosstalk from adjacent pixels, the THz wave could be modulated in a programmable manner. The switching speed of each pixel was on the order of 1 kHz. In particular, utilising the hysteresis effect of VO 2 , the memory effect is demonstrated. The THz amplitude of each pixel can be written and erased by individual current pulses. Furthermore, multi-state THz images could be generated and stored, with a retention time of more than 5 hours. This programmable metamaterial with memory effect can be extended to other frequency bands and opens a route for electromagnetic information processing.