Cardiovascular disease is the leading cause of death worldwide and cardiac surgery is a key treatment. This study explores metabolite changes as a consequence of ischemia-reperfusion due to cardiac surgery with the use of cardiopulmonary bypass (CPB). To describe the ischemia-reperfusion injury, metabolite changes were monitored in fifty patients before and after CPB at multiple time points. We describe a longitudinal metabolite dataset containing nearly 600 serum nuclear magnetic resonance (NMR) spectra obtained from samples collected simultaneously from the pulmonary artery (deoxygenated blood) and left atrium (oxygenated blood) before ischemia (pre-CPB), immediately after reperfusion (end-CPB), and the following 2, 4, 8, and 20 hours postoperatively. In addition, a longitudinal dataset including 57 quantified metabolites is also provided. These datasets will help researchers studying ischemia-reperfusion injury, as well as the time-dependent alterations related to the surgical trauma and the subsequent processes required in regaining metabolite balance. The datasets could also be used for the development of processing algorithms for NMR-based metabolomics studies and methods for the analysis of longitudinal multivariate data.