We used the Linac Coherent Light Source free-electron x-ray laser to probe the electronic structure of CO molecules as their chemisorption state on Ru(0001) changes upon exciting the substrate by using a femtosecond optical laser pulse. We observed electronic structure changes that are consistent with a weakening of the CO interaction with the substrate but without notable desorption. A large fraction of the molecules (30%) was trapped in a transient precursor state that would precede desorption. We calculated the free energy of the molecule as a function of the desorption reaction coordinate using density functional theory, including van der Waals interactions. Two distinct adsorption wells—chemisorbed and precursor state separated by an entropy barrier—explain the anomalously high prefactors often observed in desorption of molecules from metals.