In conventional solid-state photovoltaics, electron-hole pairs are created by light absorption in a semiconductor and separated by the electric field spaning a micrometre-thick depletion region. The maximum voltage these devices can produce is equal to the semiconductor electronic bandgap. Here, we report the discovery of a fundamentally different mechanism for photovoltaic charge separation, which operates over a distance of 1-2 nm and produces voltages that are significantly higher than the bandgap. The separation happens at previously unobserved nanoscale steps of the electrostatic potential that naturally occur at ferroelectric domain walls in the complex oxide BiFeO(3). Electric-field control over domain structure allows the photovoltaic effect to be reversed in polarity or turned off. This new degree of control, and the high voltages produced, may find application in optoelectronic devices.