Background: Virtually no studies on the dynamics of the intestinal microbiota in patients admitted to the intensive care unit (ICU) are published, despite the increasingly recognized important role of microbiota on human physiology. Critical care patients undergo treatments that are known to influence the microbiota. However, dynamics and extent of such changes are not yet fully understood. To address this topic, we analyzed the microbiota before, during and after planned major cardio surgery that, for the first time, allowed us to follow the microbial dynamics of critical care patients. In this prospective, observational, longitudinal, single center study, we analyzed the fecal microbiota using 16S rRNA gene sequencing. Results: Samples of 97 patients admitted between April 2015 and November 2016 were included. In 32 patients, data of all three time points (before, during and after admission) were available for analysis. We found a large intra-individual variation in composition of gut microbiota. During admission, a significant change in microbial composition occurred in most patients, with a significant increase in pathobionts combined with a decrease in strictly anaerobic gut bacteria, typically beneficial for health. A lower bacterial diversity during admission was associated with longer hospitalization. In most patients analyzed at all three time points, the change in microbiota during hospital stay reverted to the original composition post-discharge. Conclusions: Our study shows that, even with a short ICU stay, patients present a significant change in microbial composition shortly after admission. The unique longitudinal setup of this study displayed a restoration of the microbiota in most patients to baseline composition post-discharge, which demonstrated its great restorative capacity. A relative decrease in benign or even beneficial bacteria and increase of pathobionts shifts the microbial balance in the gut, which could have clinical relevance. In future studies, the microbiota of ICU patients should be considered a good target for optimisation.