It has never been demonstrated whether magnetite synthesized through the heat-dependent decomposition of carbonate precursors retains the chemical and structural features of the carbonates. In this study, synthetic (Ca,Mg,Fe)CO3 was thermally decomposed by heating from 25 to 700°C under 1atm CO2, and by in situ exposure under vacuum to the electron beam of a transmission electron microscope. In both cases, the decomposition of the carbonate was topotactic and resulted in porous pseudomorphs composed of oriented aggregates of magnetite nanocrystals. Both calcium and magnesium were incorporated into nanophase magnetite, forming (Ca,Mg)-magnetites and (Ca,Mg)-ferrites when these elements were present in the parent material, thus preserving the chemical signature of the precursor. These results show that magnetites synthesized in this way acquire a chemical and structural inheritance from their carbonate precursor that indicates how they were produced. These results are not only important in the determination of the origin of chemically-impure, oriented nanophase magnetite crystals in general, but they also provide important insights into the origin of the large, euhedral, chemically-pure, [111]-elongated magnetites found within Ca-, Mg- and Fe-rich carbonates of the Martian meteorite ALH84001. Based on our experimental results, the chemically-pure magnetites within ALH84001 cannot be genetically related to the Ca-, Mg- and Fe-rich carbonate matrix within which they are embedded, and an alternative explanation for their occurrence is warranted.