The invention provides a sludge composting method, and relates to a sludge treatment method which comprises the steps of preferable accessory selection, CK21 fungus spraying inoculation, heavy metal passivation and powder granulation, and then three-dimensional composite biological organic fertilizer with organic, inorganic and microbial active constituents is obtained. Mushroom compost and pig manure are used as accessories which are easily obtained and degraded, the stacker fermentation time is short, only one time of fermentation is needed, the C/N ratio can be effectively adjusted, and the water content of the sludge is reduced; and the efficient beneficial bio-fungus community CK21 is adopted. The microbial concentration is high, the secretion ability of the enzyme is strong, organic matters can be quickly decomposed so as to prevent the corruption of the organic matters, no odor exists, sludge is used for CK21 inoculation, fermentation starts fast, and the effect is good; and the product is inoculated with the CK21 fungus secondarily so as to further balance and activate nutrients, and the microbial natural reproduction is utilized to realize the is called flower dipping absorbing of the plants to nutrients. The invention has the advantages of optimizing the composting conditions, shortening the composting time, reducing energy consumption of turning, and reducing the damage of the heavy metal on the ecological environment.