Depleted oil reservoirs are considered a viable solution to the global challenge of CO2 storage. A key concern is whether the wells can be suitably sealed with cement to hinder the escape of CO2. Under reservoir conditions, CO2 is in its supercritical state, and the high pressures and temperatures involved make real-time microscopic observations of cement degradation experimentally challenging. Here, we present an in situ 3D dynamic X-ray micro computed tomography (μ-CT) study of well cement carbonation at realistic reservoir stress, pore-pressure, and temperature conditions. The high-resolution time-lapse 3D images allow monitoring the progress of reaction fronts in Portland cement, including density changes, sample deformation, and mineral precipitation and dissolution. By switching between flow and nonflow conditions of CO2-saturated water through cement, we were able to delineate regimes dominated by calcium carbonate precipitation and dissolution. For the first time, we demonstrate experimentally the impact of the flow history on CO2 leakage risk for cement plugging. In-situ μ-CT experiments combined with geochemical modeling provide unique insight into the interactions between CO2 and cement, potentially helping in assessing the risks of CO2 storage in geological reservoirs.