Catalysts for energy related applications, in particular metallic nanoalloys, readily undergo atomic-level changes during electrochemical reactions. The origin, dynamics and implications of the changes for the catalysts' activity inside fuel cells though are not well understood. This is largely because they are studied on model nanoalloy structures under controlled laboratory conditions. Here we use combined synchrotron X-ray spectroscopy and total scattering to study the dynamic behaviour of nanoalloys of Pt with 3d-transition metals as they function at the cathode of an operating proton exchange membrane fuel cell. Results show that the composition and atomic structure of the nanoalloys change profoundly, from the initial state to the active form and further along the cell operation. The electrocatalytic activity of the nanoalloys also changes. The rate and magnitude of the changes may be rationalized when the limits of traditional relationships used to connect the composition and structure of nanoalloys with their electrocatalytic activity and stability, such as Vegard's law, are recognized. In particular, deviations from the law inherent for Pt-3d metal nanoalloys can well explain their behaviour under operating conditions. Moreover, it appears that factors behind the remarkable electrocatalytic activity of Pt-3d metal nanoalloys, such as the large surface to unit volume ratio and "size misfit" of the constituent Pt and 3d-transition metal atoms, also contribute to their instability inside fuel cells. The new insight into the atomic-level evolution of nanoalloy electrocatalysts during their lifetime is likely to inspire new efforts to stabilize transient structure states beneficial to their activity and stability under operating conditions, if not synthesize them directly.