Contact of the Mg anode with oxygen impurities, traces of water, or decomposition products of the electrolyte results in an interface layer impermeable to Mg cations, leading to battery failure. To investigate the initial steps of Mg anode passivation, we performed MD simulations of Mg(0001), Mg(1010)A, and Mg(1011) surfaces in contact with an oxygen atmosphere. A weakly coupled NHC thermostat set to 300 K was applied only to the ten innermost layers of the Mg slab to avoid quenching of surface reactions and to prevent surface melting which would otherwise have to be compensated by adding an inefficiently large number of surface layers. For Mg(0001), the energy evolution, average temperature in the simulation box, and snapshots at distinct time points are shown in Figure . Analogous results for Mg(1010)A and Mg(1011) are presented in the Supporting Information (Figures and). Since the average temperature inside the cell is insufficient to understand the processes taking place at the surface, we divided the z-axis into 500 equally-sized sections and calculated the temperature of all atoms inside the corresponding box. In this way, we obtained a temperature profile along the z-axis to calculate the surface temperature T surf .