The research focused on assessing the response of oxidoreductases (dehydrogenases and catalase) and hydrolases (urease, acid phosphatase, alkaline phosphatase, arylsulfatase, and β-glucosidase) to diesel oil (DO) and gasoline (G) contamination of soils subjected to phytoremediation with Zea mays. The activity of enzymes constitutes one of the fundamental mechanisms for the removal of contaminants from soil, which have the potential to contaminate not only the soil but also groundwater and water reservoirs. Additionally, correlations between enzyme activity and the basic physicochemical properties of the soil were determined. The interaction of perlite and dolomite with soil enzymes and the cultivated plant was also tested. The study was carried out in a pot experiment, where soil contaminated with DO or G was artificially treated at doses of 0, 8 cm3, and 16 cm3 kg−1. Perlite and dolomite were applied for remediation at doses of 0 and 10 g kg−1 of soil. Zea mays was found to respond to the tested pollutant with a reduction in biomass. DO affected the growth of this plant more than G. DO reduced the yield of aerial parts by 86% and G by 74%. The negative effects of these pollutants on the growth and development of Zea mays were mitigated by both perlite and dolomite. DO exerted greater pressure than G on the activity of oxidoreductases and hydrolases, as well as on the physicochemical properties of the soil. DO enhanced the activity of oxidoreductases and most hydrolases, whereas G inhibited them. The implementation of dolomite intensified the activity of all enzymes, except AcP (acid phosphatase) and Glu (ß-glucosidase), in soil contaminated with DO and G, and also improved its physicochemical properties. Perlite induced less significant effects than dolomite on soil enzymes and the physicochemical properties of the soil.