Radio emissions from Jupiter provided the first evidence that this giant planet has a strong magnetic field and a large magnetosphere. Jupiter also has polar aurorae, which are similar in many respects to Earth's aurorae. The radio emissions are believed to be generated along the high-latitude magnetic field lines by the same electrons that produce the aurorae, and both the radio emission in the hectometric frequency range and the aurorae vary considerably. The origin of the variability, however, has been poorly understood. Here we report simultaneous observations using the Cassini and Galileo spacecraft of hectometric radio emissions and extreme ultraviolet auroral emissions from Jupiter. Our results show that both of these emissions are triggered by interplanetary shocks propagating outward from the Sun. When such a shock arrives at Jupiter, it seems to cause a major compression and reconfiguration of the magnetosphere, which produces strong electric fields and therefore electron acceleration along the auroral field lines, similar to the processes that occur during geomagnetic storms at the Earth.