A pinned layer of an MR element includes an underlying magnetic layer made of a magnetic alloy layer having a body-centered cubic structure, and a Heusler alloy layer formed on the underlying magnetic layer. A free layer of the MR element includes an underlying magnetic layer made of a magnetic alloy layer having a body-centered cubic structure, and a Heusler alloy layer formed on the underlying magnetic layer. Each of these two Heusler alloy layers is made of a CoMnSi alloy having an Mn content higher than 25 atomic percent and lower than or equal to 40 atomic percent, and contains a principal component having a B2 structure in which Co atoms are placed at body-centered positions of unit cells and Mn atoms or Si atoms are randomly placed at vertexes of the unit cells.