In this study, the occurrence, fractionation, and potential ecological risk associated with seven heavy metals (HMs), i.e., Cd, Cr, Cu, Ni, Pb, Zn and Hg in sewage sludge (SS) were investigated. The main aim of the study was to conduct the first comprehensive analysis of the potential ecological risk of HMs in SS collected from two municipal wastewater treatment plants (WWTPs) using ultrasonic disintegration (UD) of thickened excess sludge aimed at improving the effects of anaerobic digestion (AD). In order to assess the level of potential ecological risk, two groups of indices related to the total content of HMs and their chemical forms were used. For this purpose, a modified BCR sequential extraction was conducted. The obtained results revealed that according to the values of total indices, the highest potential ecological risk was posed by Cd, Cu and Zn (and to a lesser extent by Ni and Cr), while in relation to speciation indices by Ni, Zn, Cd (and in some cases by Cr). In general, the highest risk was indicated at the beginning (primary and excess SS) and the two final stages of sludge processing (digested and dewatered SS). This means that the level of ecological risk may strongly depend on the processes used in WWTPs and especially on AD, dehydration and the activated sludge process, as well as on the characteristics of raw wastewater. The results of the statistical analysis and balance sheets revealed that the key factors which may influence the way that HMs bind in SS are: pH, TOC, OM and Eh. The obtained results showed that UD does not cause any significant changes in the total HMs concentrations in SS, and their release into supernatant in the mobile forms. This proves that UD is a safe and environmentally friendly method of sewage sludge pretreatment.