The measurement of very-high-energy cosmic-ray electrons is intrinsically difficult due to their very steep spectrum with low fluxes and an enormous background of hadronic cosmic rays. The large collection areas needed for such a measurement can be provided by ground-based imaging atmospheric Cherenkov telescopes. The High Energy Stereoscopic System (H.E.S.S.) has performed the first ground-based cosmic-ray electron measurement and thereby extended the measured range of the spectrum to several TeV.