Aurorae are detected from all the magnetized planets in our Solar System, including Earth. They are powered by magnetospheric current systems that lead to the precipitation of energetic electrons into the high-latitude regions of the upper atmosphere. In the case of the gas-giant planets, these aurorae include highly polarized radio emission at kilohertz and megahertz frequencies produced by the precipitating electrons, as well as continuum and line emission in the infrared, optical, ultraviolet and X-ray parts of the spectrum, associated with the collisional excitation and heating of the hydrogen-dominated atmosphere. Here we report simultaneous radio and optical spectroscopic observations of an object at the end of the stellar main sequence, located right at the boundary between stars and brown dwarfs, from which we have detected radio and optical auroral emissions both powered by magnetospheric currents. Whereas the magnetic activity of stars like our Sun is powered by processes that occur in their lower atmospheres, these aurorae are powered by processes originating much further out in the magnetosphere of the dwarf star that couple energy into the lower atmosphere. The dissipated power is at least four orders of magnitude larger than what is produced in the Jovian magnetosphere, revealing aurorae to be a potentially ubiquitous signature of large-scale magnetospheres that can scale to luminosities far greater than those observed in our Solar System. These magnetospheric current systems may also play a part in powering some of the weather phenomena reported on brown dwarfs.