The invention discloses an anaerobic reactor comprising a three-phase separating device, wherein the three-phase separating device comprises a gas releasing device arranged at the outer side of a coaming, and a precipitating device and a water distributing device, which are arranged at the inner side of the coaming, the precipitating device comprises a water channel composed of a plurality of thin plates or pipelines forming included angles with the vertical direction, a water outlet groove is communicated above the precipitating device, a mud bucket is arranged below the precipitating device, the precipitating device and the mud bucket form a hollow cavity, a mud outlet is arranged at the bottom part of the precipitating device, one end of the water distributing device is communicated with the gas releasing device, the other end of the water distributing device is communicated with a water distributing tank at the inner side of the coaming, and a plurality of holes communicated with the hollow cavity are formed in the water distributing tank. Since the water channel composed of the plurality of thin plates or pipelines forming included angles with the vertical direction, muddy water can pass through areas except the plate thicknesses of the thin plates or the wall thicknesses of the pipelines, so that compared with gaps between gas collection covers, the area of the separated sludge flowing back to the reaction region is greatly increased, which improves the muddy water separation effect so as to greatly improve the hydraulic load.