Transition-metal complexes have long attracted interest for fundamental chemical reactivity studies and possible use in solar energy conversion(1,2). Electronic excitation, ligand loss from the metal centre, or a combination of both, creates changes in charge and spin density at the metal site(3-11) that need to be controlled to optimize complexes for photocatalytic hydrogen production(8) and selective carbon-hydrogen bond activation(9-11). An understanding at the molecular level of how transition-metal complexes catalyse reactions, and in particular of the role of the short-lived and reactive intermediate states involved, will be critical for such optimization. However, suitable methods for detailed characterization of electronic excited states have been lacking. Here we show, with the use of X-ray laser-based femtosecond-resolution spectroscopy and advanced quantum chemical theory to probe the reaction dynamics of the benchmark transition-metal complex Fe(CO)(5) in solution, that the photo-induced removal of CO generates the 16-electron Fe(CO)(4) species, a homogeneous catalyst(12,13) with an electron deficiency at the Fe centre(14,15), in a hitherto unreported excited singlet state that either converts to the triplet ground state or combines with a CO or solvent molecule to regenerate a penta-coordinated Fe species on a sub-picosecond timescale. This finding, which resolves the debate about the relative importance of different spin channels in the photochemistry of Fe(CO)(5) (refs 4, 16-20), was made possible by the ability of femtosecond X-ray spectroscopy to probe frontier-orbital interactions with atom specificity. We expect the method to be broadly applicable in the chemical sciences, and to complement approaches that probe structural dynamics in ultrafast processes.