When a Si-doped GaAs–AlAs/GaAs heterostructure is illuminated with 1.98 eV light at 4.2 K, a reduction in the two-dimensional (2D) electron density (n2D) is observed. This reduction is followed at times by a small increase in n2D even after the illumination has been switched off. This change is observed on the time scale of minutes and can be explained based on the band bending that results after a reduction in n2D. The negative persistent photoconductivity (NPPC) effect characterized by a persistent reduction in n2D, a postillumination change in n2D, and a long persistence time for T⩽40 K has been investigated. I have used Shubnikov–de Haas oscillations and time-resolved, as well as temperature-dependent, Hall-effect measurements to investigate the origin of this phenomenon. The illumination generates electron–hole (e–h) pairs in the superlattice, where the electrons are trapped into the shallow donor state (SDS) of Si and the holes drift to the two-dimensional channel to recombine with the 2D electrons. All the trapped electrons can be recovered by heating the sample to 60 K. The temperature dependence of the NPPC effect is determined only by the binding energy of the SDS of Si, which is found to be about 5 meV. The e–h recombination in the 2D channel is caused by negatively charged defects, which temporarily bind the holes. This fact is manifested also in the optical quenching of this effect by photons with 1.41 eV or larger energy. The saturation values of n2D(n2Dsat) obtained for 0.8, 1.41, or 1.98 eV illumination at 4.2 K have been investigated and the results confirm the presence of these fixed negative charges (FNCs) near the 2D channel. The change in n2Dsat for 0.8 eV illumination, caused by 1.98 eV illumination, also confirms the presence of FNCs.