In missions to the Moon and Mars, in situ fabrication of construction materials would dramatically decrease the amount of materials transported from Earth and reduce the mission cost. High-temperature sintering, however, requires a significant energy input. Recently, it has been shown that a lunar regolith simulant (JSC-1A) forms a thermite-type mixture with magnesium, which exhibits a self-sustained combustion leading to the production of ceramic materials. In the present work, magnesium was mixed with JSC-1A and two Martian regolith simulants (JSC-Mars-1A and Mojave Mars), and combustion of these mixtures was studied experimentally and via thermodynamic calculations. Also, to understand the reaction mechanism, thermoanalytical methods were used. For each mixture, the measured combustion temperature and product composition were in reasonable agreement with thermodynamic calculations. Thermal analysis has shown that iron oxide and silica play important roles in the reaction mechanism and explained the observed differences in the combustion of three regolith simulants.