The invention provides a landfill type biogas generator, which belongs to the field of comprehensive utilization of agricultural wastes. The landfill type biogas generator is embedded in a soil layer,and comprises a barrel body and a barrel cover covering the barrel body, wherein an annular connecting seat is screwed into the barrel body, a rotating shaft is vertically arranged in the barrel body, the connecting seat sleeves the rotating shaft which is hollow, the upper end and the lower end of the rotating shaft are open and closed, respectively, the rotating shaft is rotatably connected with the barrel body through a bearing, a groove is formed in the bottom wall of the barrel body, the lower end of the rotating shaft extends out of the barrel body and is located in the groove, a gear motor is fixed in the groove and can drive the rotating shaft to rotate through a transmission mechanism, a seal is formed between the rotating shaft and the connecting seat through a sealing ring, anair inlet hole is formed in the side wall of the rotating shaft in a penetrating manner and is located below the connecting seat, the top of the barrel cover extends upward to form a straight tubularexhaust part, the upper end of the exhaust part protrudes out of the soil layer and is connected to a valve, and the lower end of the rotating shaft is fixedly provided and sleeved with an annular stirring blade. The landfill type biogas generator has the advantage of good safety.