With the objective of improving qualitative characteristics of compost, an analytical survey was carried out in a composting plant in Lombardy (Italy) in all process of production, with particular reference to heavy metals (HM) Zn and Pb. The investigation was principally aimed to study the contents and the accumulation of HM during composting process and to identify a technological solution for reducing HM content in the final product. A merceological analysis of Municipal Solid Waste (MSW) input to the composting plant, a chemical analysis of the organic fraction of MSW after mechanical separation, and a comparison with values reported by some authors, showed that Zn and Pb are significant contaminants, even though concentrations have recently decreased in comparison to previous years. On the basis of Zn and Pb content in raw material input to the plant, an estimate of the theoretical value of Zn and Pb in produced compost was made. The comparison of theoretical values with the real ones, experimentally determined, confirmed that at the end of composting process the concentration is 2.6 times the initial value for Zn and 1.6 times the initial value for Pb, as suggested by some authors. Finally, the analytical investigation of Zn and Pb contents in the compost refining line, carried out by means of sieving tests, showed that by eliminating a fraction of compost < 1 mm, both Zn and Pb, which is the more critical one, can be largely removed, without a substantial yield loss (only 10% of the final product is eliminated).