The invention relates to a method for producing mash gas from municipal sludge through dry method anaerobic fermentation, which belongs to the field of solid waste reclamation, and can overcome the difficulties difficult mass transfer, difficult gas overflow and the like caused by dewatered sludge which has high viscosity, no fluidity, no gaps and the like. The method comprises the following steps of: performing biological pre-drying on the dewatered sludge, and stacking the dewatered sludge in an aerobic environment for 2 to 3 days; adding the material after the biological pre-drying into anaerobic granular sludge or biogas residues to perform inoculation, and performing static starting for 6 to 8 days; performing acidogenic fermentation on the material under an aerobic or anaerobic condition, performing spiral band type or anchor type stirring, and adjusting the pH if necessary; performing methanogenesis fermentation on the material after acid production under an anaerobic condition, performing extruding type stirring, keeping the temperature of the material to be 35+/-1 DEG C, and keeping the pH between 6.6 and 7.5; and performing refluxing inoculation on part of the biogas residues, and performing aerobic compost stabilization on the rest of the biogas residues. The method can be used for beneficial utilization of the municipal sludge and the recovery of biomass energy sources, and compared with wet fermentation, the method can save equipment investment and land occupation.