The effect of a lateral electric current on the photoluminescence H-band of an AlGaAs/GaAs heterostructure is investigated. The photoluminescence intensity and optical orientation of electrons contributing to the H-band are studied by means of continuous wave and time-resolved photoluminescence spectroscopy and time-resolved Kerr rotation. It is shown that the H-band is due to recombination of the heavy holes localized at the heterointerface with photoexcited electrons attracted to the heterointerface from the GaAs layer. Two lines with significantly different decay times constitute the H-band: a short-lived high-energy one and a long-lived low-energy one. The high-energy line originates from recombination of electrons freely moving along the structure plane, while the low-energy one is due to recombination of donor-bound electrons near the interface. Application of the lateral electric field of ~ 100-200 V/cm results in a quenching of both lines. This quenching is due to a decrease of electron concentration near the heterointerface as a result of a photocurrent-induced heating of electrons in the GaAs layer. On the contrary, electrons near the heterointerface are effectively cooled, so the donors near the interface are not completely empty up to ~ 100 V/cm, which is in stark contrast with the case of bulk materials. The optical spin polarization of the donor-bound electrons near the heterointerface weakly depends on the electric field. Their polarization kinetics is determined by the spin dephasing in the hyperfine fields of the lattice nuclei. The long spin memory time (> 40 ns) can be associated with suppression of the Bir-Aronov-Pikus mechanism of spin relaxation for electrons.