Then, as shown in FIG. 8B, a second insulating cover layer 280 is formed to cover the MRAM cell structure. The second insulating cover layer 280 can be formed by CVD, PVD or ALD or any other suitable film deposition method. As shown in FIG. 8B, the second insulating cover layer 280 is conformally formed. As set forth above, the second insulating cover layer 280 includes an aluminum-based insulating material in some embodiments. The aluminum-based insulating material, such as AlO (Al2O3), AlN, AlC, AlOC and AlON, can be formed by the following operations. First, an aluminum layer is formed on the first insulating cover 227. The aluminum layer is formed by, for example, metal-organic CVD (MOCVD) or ALD using tri-methyl-aluminum (TMA). Then, a plasma treatment using NH3, CO2 and/or CO gases is performed over the aluminum layer, to convert the aluminum layer into AlO, AlN, AlC, AlOC or AlON. The concentrations of Al, O, C and/or N in the plasma treated aluminum layer are not uniform, in particular, along the vertical direction. The AlON layer may be made of two layers of AlO and AlN. In some embodiments, a thin layer of aluminum having a thickness of less than about 1 nm remains at the bottom of the layer. A chemical oxidation of the aluminum layer using an oxidation solution may be employed. In some embodiments, the AlO, AlOC, AlC, and/or AlON layer can be directly formed by CVD, PVD or ALD or other suitable method by using appropriate source gases. In some embodiments, the second insulating cover layer 280 is formed by CVD, PVD or ALD at a temperature range in a range from about 300° C. to about 450° C. Although lower forming temperature (e.g., less than 300° C.) may be employed, since there is the first insulating cover layer 227 is formed to cover the MTJ film stack 255, a higher forming temperature (about 300° C. to about 450° C.) may not damage the MTJ film stack 255.