We investigate the origin of in-plane uniaxial magnetic anisotropy of epitaxial ferromagnetic MnAs film on GaAs(001). Interestingly, as temperature increases, the in-plane uniaxial magnetic anisotropy along the MnAs[11 (2) over bar0] direction changes and then disappears. Direct microscopic domain observations show that the type of domain structure changes from a simple domain to a closure one with increasing temperature. From these results, the temperature-dependent change of the in-plane magnetic anisotropy is ascribed to a decrease in the shape anisotropy induced by the decrease in the width of the ferromagnetic a-stripe. (9 2008 American Institute of Physics.