Soil and groundwater contamination caused by petroleum hydrocarbons is a severe environmental problem. In this study, a novel electrolyzed catalytic system (ECS) was developed to produce nanobubble-contained electrolyzed catalytic (NEC) water for the remediation of petroleum-hydrocarbon-contaminated soils and groundwater. The developed ECS applied high voltage (220 V) with direct current, and titanium electrodes coated with iridium dioxide were used in the system. The developed ECS prototype contained 21 electrode pairs (with a current density of 20 mA/cm2), which were connected in series to significantly enhance the hydroxyl radical production rate. Iron-copper hybrid oxide catalysts were laid between each electrode pair to improve the radical generation efficiency. The electron paramagnetic resonance (EPR) and Rhodamine B (RhB) methods were applied for the generated radical species and concentration determination. During the operation of the ECS, high concentrations of nanobubbles (nanobubble density = 3.7 × 109 particles/mL) were produced due to the occurrence of the cavitation mechanism. Because of the negative zeta potential and nano-scale characteristics of nanobubbles (mean diameter = 28 nm), the repelling force would prevent the occurrence of bubble aggregations and extend their lifetime in NEC water. The radicals produced after the bursting of the nanobubbles would be beneficial for the increase of the radical concentration and subsequent petroleum hydrocarbon oxidation. The highly oxidized NEC water (oxidation-reduction potential = 887 mV) could be produced with a radical concentration of 9.5 × 10−9 M. In the pilot-scale study, the prototype system was applied to clean up petroleum-hydrocarbon polluted soils at a diesel-oil spill site via an on-site slurry-phase soil washing process. The total petroleum hydrocarbon (TPH)-contaminated soils were excavated and treated with the NEC water in a slurry-phase reactor. Results show that up to 74.4% of TPH (initial concentration = 2846 mg/kg) could be removed from soils after four rounds of NEC water treatment (soil and NEC water ratio for each batch = 10 kg: 40 L and reaction time = 10 min). Within the petroleum-hydrocarbon plume, one remediation well (RW) and two monitor wells (located 1 m and 3 m downgradient of the RW) were installed along the groundwater flow direction. The produced NEC water was injected into the RW and the TPH concentrations in groundwater (initial concentrations = 12.3–15.2 mg/L) were assessed in these three wells. Compared to the control well, TPH concentrations in RW and MW1 dropped to below 0.4 and 2.1 mg/L after 6 m3 of NEC water injection in RW, respectively. Results from the pilot-scale study indicate that the NEC water could effectively remediate TPH-contaminated soils and groundwater without secondary pollution production. The main treatment mechanisms included (1) in situ chemical oxidation via produced radicals, (2) desorption of petroleum hydrocarbons from soil particles due to the dispersion of nanobubbles into soil pores, and (3) enhanced TPH oxidation due to produced radicals and energy after nanobubble bursting.