The invention discloses an alloy material with a gradient layer. The innovative point lies in that: a substrate layer, a wear-resistant anticorrosive layer and an anti-metal powder layer are sequentially arranged from inside to outside; the substrate layer is pure magnesium or pure The wear resistant coating is a metal material layer containing copper, zinc, tin, silicon and manganese; and the antimetal powder layer is a metal material layer comprising carbon, silicon, manganese, phosphorus, chromium, aluminum and cobalt. The graded layer-based alloy material of the present invention consists of a base material layer, an anti-wear coating and an anti-metal powder layer from the inside to the outside, respectively, so as to avoid the stress shielding effect and thereby increase the biocompatibility. The wear- Layer and anti-metal powder layer, more conducive to the growth of bone tissue, improve the bioactivity implanted in the human body, can be used in the medical field. The method for preparing the alloy material has the advantages of simple process steps, convenient operation, excellent quality and cost saving of the alloy prepared under the operating parameters, and more high production efficiency.