Proteins are inherently plastic molecules, whose function often critically depends on excursions between different molecular conformations (conformers). However, a rigorous understanding of the relation between a protein's structure, dynamics and function remains elusive. This is because many of the conformers on its energy landscape are only transiently formed and marginally populated (less than a few per cent of the total number of molecules), so that they cannot be individually characterized by most biophysical tools. Here we study a lysozyme mutant from phage T4 that binds hydrophobic molecules and populates an excited state transiently (about 1 ms) to about 3% at 25 °C (ref. 5). We show that such binding occurs only via the ground state, and present the atomic-level model of the 'invisible', excited state obtained using a combined strategy of relaxation-dispersion NMR (ref. 6) and CS-Rosetta model building that rationalizes this observation. The model was tested using structure-based design calculations identifying point mutants predicted to stabilize the excited state relative to the ground state. In this way a pair of mutations were introduced, inverting the relative populations of the ground and excited states and altering function. Our results suggest a mechanism for the evolution of a protein's function by changing the delicate balance between the states on its energy landscape. More generally, they show that our approach can generate and validate models of excited protein states.