Cosmic strings, topological remnants of the earlier universe, arise in many grand unified theories. Witten1 showed that under some conditions these strings can behave like superconductors: current is carried by massless charge carriers, which can be either fermions or bosons, that move at the speed of light along the string. These strings are superconductors in the sense that any induced constant current (d.c.) will persist. The persistence is guaranteed by topological index theorems1, but no such theorem exists for alternating currents (a.c.), which can be damped by radiation or (as we report here) can even grow exponentially through dynamo self-interaction. This mechanism converts the mechanical energy of the string into electromagnetic fields.