The invention relates to a magnesium-containing rare earth oxygen storage material and a preparation method thereof. The expression of the magnesium-containing rare earth oxygen storage material is RExZryMzO2, wherein M represents Mg or other metal which comprises cerium zirconium composite oxide, praseodymium zirconium composite oxide, terbium zirconium composite oxide, and the like. The content of magnesium oxide is 0.001 wt% -5 wt%. The magnesium-containing rare earth oxygen storage material is prepared by using magnesium bicarbonate as a precipitant. The preparation method comprises the following steps: mixing rare earth (cerium, praseodymium or terbium) and zirconium, or mixing rare earth (cerium, praseodymium or terbium), zirconium and at least one of other rare earth ions (lanthanum, praseodymium, neodymium, samarium, gadolinium, yttrium) and/or other metal ions (aluminium, barium, strontium, titanium, manganese, iron, copper, hafnium); performing precipitation by using a magnesium bicarbonate or/and calcium bicarbonate aqueous solution as a precipitant, wherein the magnesium bicarbonate or/and calcium bicarbonate aqueous solution is prepared by at least one procedure of roasting, digestion, slurry mixing, and carbonization of raw materials of minerals or oxides or hydroxides of magnesium or/and calcium, then performing at least one procedure of filtration, washing, drying, and the like, and finally roasting at a certain temperature to obtain the product. The preparation method of the invention adopts a cheap routine chemical precipitant, realizes the effective recycling of magnesium, calcium, carbon dioxide and the like, and greatly reduces the production cost of the rare earth oxygen storage material. On the other hand, the production process in the invention does not generate ammonia nitrogen waste water, or waste water with high salinity, and reduces the discharge of carbon dioxide greenhouse gas; the preparation process is green and environment-friendly, and eliminates environment pollution.