We have investigated the structural and compositional changes that are induced by the segregation of substrate Mg to the surface of 1 mu m-thick Fe3O4(001) films on MgO(001). The thin films have been grown with plasma-assisted MBE. Characterization with reflection high-energy electron diffraction, x-ray diffraction, and superconducting quantum interference device magnetometry, show slightly strained, single-crystalline Fe3O4 films. For the surface studies, we have combined low-energy electron diffraction, and scanning .unneling microscopy to study surface structure and morphology. The initial surface content was determined by x-ray photoelectron spectroscopy. The surfaces of the molecular-beam epitaxy-grown samples are flat and show a (root 2 x root 2)R45 degrees reconstruction with respect to the Fe3O4 surface unit cell. Onset of Mg segregation to the surface occurs around 670 K, with long, narrow extensions of terraces growing along the [110] and <[1(1)over bar 0]> directions. Heating in an oxygen atmosphere induces a 1x4 surface reconstruction, and extremely long (approximate to 1000 Angstrom), wide terraces. We attribute this annealing stage to the formation of a MgFe2O4 surface phase, exhibiting highly anisotropic surface diffusion and step formation energy.