Microbial technology for the comprehensive utilization of excess activated sludge, i.e. production of PHA by adding native PHA synthesis-bacteria during domestication and fermentation for activated sludge; bioleaching activated sludge to remove heavy metals by Acidithiobacillus ferrooxidans and Acidithiobacillus thiooxidans; production of biological fertilization by using solid state fermentation for P-solubilizing bacteria and K-releasing bacteria. Results showed that the ratio of PHA in VSS was above 20% under the 500 L pilot scale; the contents of heavy metals in activated sludge accorded with the National Discharge Standard; the number functional bacteria for microbial fertilizer was above one hundred million.