The invention discloses a method for preparing a high-purity esomeprazole magnesium trihydrate. The method comprises the following steps: (1), mixing omeprazole sulfide, (R)-1,1 minute-binaphthyl-2,2 minute-diamine and inorganic metal salt in acetone, thereby obtaining a mixture M; (2), at a condition of 15-45 DEG C, dipping 30% H2O2 into the mixture M of the step (1) to perform an oxidization reaction, and after the oxidization reaction is completed, adding potassium hydroxide and methanol solution, thereby obtaining esomeprazole potassium; (3), mixing the esomeprazole potassium obtained in step (2) with anhydrous magnesium chloride in methyl alcohol, stirring to react, and centrifuging and separating, thereby obtaining the esomeprazole magnesium trihydrate, wherein in step (1), the inorganic metal salt is cobalt (II), iron (II) or magnesium (II) metal salt. The method for preparing the high-purity esomeprazole magnesium trihydrate has high yield, good selectivity and high reaction efficiency, and is suitable for industrial mass production.