The zeolite imidazolate framework ZIF-8 is shown for the first time to be able to catalyze transesterification of vegetable oil with significant activity. Rationalization of this behavior at the atomic scale is provided by combining CO adsorption monitored by FTIR and DFT calculations (clusters and periodic models). We demonstrate that the acido-basic sites are located at the external surface of the material or at defects, but not in the microporosity of ZIF-8. A great variety of sites are found the surface: OH and NH groups, hydrogenocarbonates, low-coordinated Zn atoms, and free N- moieties belonging to linkers. Their proportions depend on the operating conditions (temperature and pressure). The acido-basicity of the surface is then probed by adsorption of CO at low temperature. In parallel, the species present are mapped by DFT calculations combined with a thermodynamic model. An assignment of the CO region of the FTIR spectra can thus be proposed. The complex infrared spectrum is attributed to the coexistence of classical C-adducts of CO with acid sites and other modes on basic sites (O-adducts and side-on adducts). Adsorption energies and CO frequency shifts show that some strong Lewis sites exist (in particular ZnII species), as well as strong Brønsted acid sites (NH groups), together with basic sites (OH groups and N- moieties). By calculating the co-adsorption of a model ester (methyl acetate) and methanol, we show the prevailing role of ZnII species as acid sites, combined with N- moieties and OH groups as basic ones, in determining the catalytic properties of ZIF-8. This work opens new perspectives on the use of MOFs in catalysis and, more generally, on the properties of their external surface.