The magnetic anisotropy of epitaxial layered structures of Fe3O4(tFe=4 nm)/GaAs(100), MgO(3 nm)/Fe3O4(tFe=4 nm)/GaAs(100), and Fe3O4(tFe=4 nm)/MgO(3 nm)/Fe3O4(tFe=4 nm)/GaAs(100) was studied by ferromagnetic resonance. It was shown that a predominant in-plane uniaxial magnetic anisotropy and a small fourfold cubic magnetocrystalline anisotropy existed. The in-plane uniaxial anisotropy constant decreased when the MgO layer was covered on Fe3O4/GaAs, while the cubic anisotropy increased. In the sandwich structures, two resonance peaks were observed. One is similar to that in Fe3O4/GaAs layer, while another corresponding to Fe3O4 on MgO showed more remarkable fourfold anisotropy and lower uniaxial anisotropy due to smaller mismatch between Fe3O4 and MgO. The interface the Fe3O4 layer is deposited on has dominant effect.