Photoinduced isomerization reactions lie at the heart of many chemical processes in nature. The mechanisms of such reactions are determined by a delicate interplay of coupled electronic and nuclear dynamics occurring on the femtosecond scale, followed by the slower redistribution of energy into different vibrational degrees of freedom. Here we apply time-resolved photoelectron spectroscopy with a seeded extreme ultraviolet free-electron laser to trace the ultrafast ring opening of gas-phase thiophenone molecules following ultraviolet photoexcitation. When combined with ab initio electronic structure and molecular dynamics calculations of the excited- and ground-state molecules, the results provide insights into both the electronic and nuclear dynamics of this fundamental class of reactions. The initial ring opening and non-adiabatic coupling to the electronic ground state are shown to be driven by ballistic S–C bond extension and to be complete within 350 fs. Theory and experiment also enable visualization of the rich ground-state dynamics that involve the formation of, and interconversion between, ring-opened isomers and the cyclic structure, as well as fragmentation over much longer timescales.