Although the application of magnetic compression anastomosis is becoming increasingly widespread, the magnets used in earlier studies were mostly in the shape of a whole ring. Hence, a deformable self-assembled magnetic anastomosis ring (DSAMAR) was designed in this study for gastrointestinal anastomosis. Furthermore, its feasibility was studied using a beagle model. The designed DSAMAR comprised 10 trapezoidal magnetic units. Twelve beagles were used as animal models, and DSAMARs were inserted into the stomach and colon through the mouth and anus, respectively, via endoscopy to achieve gastrocolic magnamosis. Surgical time, number of failed deformations, survival rate of the animals, and the time of magnet discharge were documented. A month later, specimens of the anastomosis were obtained and observed with the naked eye as well as microscopically. In the gastrocolic anastomosis of the 12 beagles, the procedure took 65–120 min. Although a deformation failure occurred during the operation in one of the beagles, it was successful after repositioning. The anastomosis was formed after the magnet fell off 12–18 days after the operation. Naked eye and microscopic observations revealed that the anastomotic specimens obtained 1 month later were well-formed, smooth, and flat. DSAMAR is thus feasible for gastrointestinal anastomosis under full endoscopy via the natural orifice.