A magnetoresistive element has a magnetic layer, an insulating layer and a magnetic layer, which are laminated on a base electrode, and side walls of the magnetic layers that are formed when the magnetic layers are processed. At least one element selected from the group of consisting He, C, N, O, F, Ne, Ti, V, Cu, Al, Si, P, S, Cl, Ar, Ge, As, Kr, Zr, In, Sn, Sb, Pb and Bi is injected into the side walls and edge portions of the magnetic layers to improve the magnetic characteristics of the first and second magnetic layers.