Primary magnetite grains from the mineralized endoskarn and vein-type ores contain high SiO2 (0.92-3.21 wt.%), Al2O3 (0.51-2.83 wt.%), and low MgO (0.15-0.67 wt.%), whereas varieties from the exoskarn ores have high MgO (2.76-3.07 wt.%) and low SiO2 (0.03-0.23 wt.%) and Al2O3 (0.54-1.05 wt.%). This compositional contrast indicates that trace-element geochemical composition of magnetite is largely controlled by the compositions of magmatic fluids and host rocks of the ores that have reacted with the fluids. Compared to its precursor mineral, secondary magnetite is significantly depleted in most trace elements, with SiO2 deceasing from 1.87 to 0.47 wt.% (on average) and Al2O3 from 0.89 to 0.08 wt.% in mineralized endoskarn and vein type ores, and MgO from 2.87 to 0.60 wt.% in exoskarn ores. On the contrary, average content of iron is notably increased from 69.2 wt.% to 71.9 wt.% in the secondary magnetite grains. The results suggest that the dissolution-reprecipitation process has been important in significantly removing trace elements from early-stage magnetite to form high-grade, high-quality iron ores in hydrothermal environments. The textural and compositional data confirm that the Chengchao iron deposit is of hydrothermal origin, rather than being crystallized from immiscible iron oxide melts as previously suggested. This study also highlights the importance of textural characterization using various imaging techniques before in-situ chemical analysis of magnetite, as is the case for texturally complicated UTh-bearing accessory minerals that have been widely used for UPb geochronology study.