We present a comparison between Fe K-edge x-ray absorption spectra of carbonmonoxy-myoglobin and its simulation based on density-functional theory determination of the structure and vibrations and spectral simulation with multiple-scattering theory. An excellent comparison is obtained for the main part of the molecular structure without any structural fitting parameters. The geometry of the CO ligand is reliably determined using a synergic approach to data analysis. The methodology underlying this approach is expected to be especially useful in similar situations in which high-resolution data for structure and vibrations are available.