Petroleum-derived substances have become the factor adversely affecting the soil quality and, also, crop production. However, the ability to immobilise contaminants is limited in anthropogenically altered soils. Therefore, a study was undertaken to evaluate the effects of soil contamination with diesel oil (0, 2.5, 5 and 10 cm3kg−1) on the contents of trace elements in the soil and determine the suitability of different neutralising materials (compost, bentonite and calcium oxide) for the in situ stabilisation of soil contaminated with this petroleum derivative. In the soil contaminated with the highest dose of diesel oil (10 cm3kg−1), a decrease in chromium, zinc and cobalt and an increase in the total nickel, iron and cadmium concentrations were found in the series without the addition of neutralising materials. Remediation with compost and mineral materials contributed to a significant reduction of nickel and iron, as well as cobalt, in soil (calcium oxide only). All materials used contributed to an increase in cadmium, chromium, manganese and copper in the soil. The above-mentioned materials (most notably calcium oxide) can be successfully used to reduce the effect of diesel oil on the contents of some trace elements in soil.