Many mid- and far-infrared semiconductor photodetectors rely on a photonic response, when the photon energy is large enough to excite and extract electrons due to optical transitions. Toward the terahertz range with photon energies of a few milli–electron volts, classical mechanisms are used instead. This is the case in two-dimensional electron systems, where terahertz detection is dominated by plasmonic mixing and by scattering-based thermal phenomena. Here, we report on the observation of a quantum, collision-free phenomenon that yields a giant photoresponse at terahertz frequencies (1.9 THz), more than 10-fold as large as expected from plasmonic mixing. We artificially create an electrically tunable potential step within a degenerate two-dimensional electron gas. When exposed to terahertz radiation, electrons absorb photons and generate a large photocurrent under zero source-drain bias. The observed phenomenon, which we call the “in-plane photoelectric effect,” provides an opportunity for efficient direct detection across the entire terahertz range.