In an MR element, each of a pinned layer and a free layer includes a Heusler alloy layer. The Heusler alloy layer has two surfaces that are quadrilateral in shape and face toward opposite directions. The Heusler alloy layer includes one crystal grain that touches four sides of one of the two surfaces. In a method of manufacturing the MR element, a layered film to be the MR element is formed and patterned, and then heat treatment is performed on the layered film patterned, so that crystal grains included in a film to be the Heusler alloy layer in the layered film grow and one crystal grain that touches four sides of one of the surfaces of the film to be the Heusler alloy layer is thereby formed.