Contamination of soils by heavy metals is a severe problem because of disturbances caused in the functioning of the soil and the whole ecosystem. Therefore, the aim of our research was to determine the influence of contamination of soil by zinc, copper, nickel, cadmium, and lead on the activity of arylsulfatase. A novel element of the study is a comparison of the response of arylsulfatase to five heavy metals in three soils with two pH ranges: 7.0 and 5.5. The studies were carried out under laboratory conditions. The soils (loamy sand, sandy loam, sandy clay loam), with pH 7.0 and 5.5 and contaminated with zinc, copper, nickel, cadmium, and lead were incubated for 30, 60, and 120 days. After each period, the activity of arylsulfatase was determined. Base on the activity of arylsulfatase, a resistance index of arylsulfatase (RS) to contamination with heavy metals was calculated. The highest activity of arylsulfatase was found in sandy clay loam, while the lowest was found in loamy sand. A significant correlation between the resistance of the enzyme and the level of contamination of the soil with heavy metals was proved. Arylsulfatase was most sensitive to the effects of zinc, copper, and nickel, while cadmium exerted a somewhat weaker influence and lead the least. The enzyme exhibited a higher resistance to the influence of heavy metals in neutral soils than in acidic soils. The toxic effect of heavy metals can be ordered as follows: zinc > copper > nickel > lead > cadmium.