The invention relates to a magnet for treatment under an endoscope. The magnet comprises one or more magnet bodies, magnetic poles of the magnet bodies are arranged at the upper and lower ends of themagnet bodies, and one or more connection ropes are arranged on the magnet bodies; one end of each connection rope is connected with the corresponding magnet body, and the other end of each connectionrope is provided with a rope ring; the end faces of the upper and lower ends of each magnet body are planes parallel to each other, the cross sections of the magnet bodies are circular, the diametersof the cross sections of the magnet bodies are larger than the heights of the magnet bodies, and the end faces of the upper and lower ends of the magnet bodies are rough faces. The magnet is simple in structure and convenient to operate and can be placed at the two sides of a target object, the two magnet bodies attract each other and compress the target object, avascular necrosis of mucous membranes on the junction parts is achieved, then channels are formed at the two ends which the magnet fits, and the treatment effect is achieved; or a condition is created for next treatment under the endoscope. Less complications are caused, the hospitalization period is short, and the recovery time for oral feeding is short.