The invention relates to the technical field of earthworm breeding, in particular to a method for breeding earthworms by using edible fungus residues. The method comprises the steps of (1) site selection and layout, (2) base material preparation, (3) earthworm bed laying, (4) introduction, (5) earthworm breeding and (6) harvesting and processing. According to base material preparation, after mouldy sticks, impurities and fungus bags in the edible fungus residues are removed and crushing is conducted to make the particle size of the fungus residue particles smaller than 10 mm, the water contentis adjusted; after heap retting softening, an aerobic EM bacterial liquid and a nutrient enhancer are added for heap retting fermentation; the water content of pig manure is adjusted to be 60-70%, and aerobic EM bacteria and a nutrient enhancer are added for aerobic fermentation; when the temperature of the edible fungus residues or pig manure begins to decline, heap turning, ventilation and water supplementing are conducted, ammonia toxins are removed, the operation is carried out until full fermentation is achieved, and the pH is adjusted. By means of the method, the breeding speed is high,the yield of earthworms and earthworm cast is high, the quality of the earthworm cast is high, the pollution of heavy metals is small, and the nutritional value of the earthworms is high.