Wagner was born in Pfaffenhofen an der Roth in Bavaria, Germany. He studied at the Technical University of Munich and completed his doctorate in 1972. He then worked at Ohio State University from 1973 to 1974. At first, he worked on low-temperature physics, but switched to plasma fusion research during the energy crisis of the time. In 1975, he started working for the Max Planck Institute for Plasma Physics, and in 1986 he led the tokamak experiment ASDEX.