Dust near Jupiter is produced when interplanetary impactors collide energetically with small inner moons, and is organized into a main ring, an inner halo, and two fainter and more distant gossamer rings. Most of these structures are constrained by the orbits of the moons Adrastea, Metis, Amalthea and Thebe, but a faint outward protrusion called the Thebe extension behaves differently and has eluded understanding. Here we report on dust impacts detected during the Galileo spacecraft's traversal of the outer ring region: we find a gap in the rings interior to Thebe's orbit, grains on highly inclined paths, and a strong excess of submicrometre-sized dust just inside Amalthea's orbit. We present detailed modelling that shows that the passage of ring particles through Jupiter's shadow creates the Thebe extension and fully accounts for these Galileo results. Dust grains alternately charge and discharge when traversing shadow boundaries, allowing the planet's powerful magnetic field to excite orbital eccentricities and, when conditions are right, inclinations as well.