The present invention relates to a biodegradable stent with grooves and the preparation method thereof. The biodegradable polymeric stent comprises a stent body, magnetic nanoparticles and a coating layer, wherein the grooves are excavated on the stent body at sites where a deformation is expected, or at all sites of the stent, and magnetic nanoparticles are disposed in the grooves. The temperature of the magnetic nanoparticles is raised by an external alternating magnetic field so as to heat the stent, and the stent is cooled in a human body to form a fixed structure after being heated and expanded, and the retraction rate of the expanded stent is reduced to be lower than 10%, avoiding consequences such as collapse or displacement of the stent. Meanwhile, thermal damage to the vascular wall can be reduced to a minimum by heating the stent with magnetic nanoparticles.