The present invention relates to a method for preparing a contrast agent for magnetic resonance imaging (MRI) and, more particularly, to a method for preparing a contrast agent for magnetic resonance imaging, which has improved stability by minimizing side effects by removing unreacted substances generated during a preparation process. The preparation method comprises the steps of: reacting a lanthanide with a macrocyclic chelate to form a complex-containing aqueous solution; exchanging ions using one or more resins among a cation-exchange resin, a chelate resin and an anion-exchange resin in order to remove free lanthanide and unreacted macrocyclic chelate from the complex-containing aqueous solution; controlling pH of the complex aqueous solution in a neutral range; and removing germs from the complex aqueous solution.