Biodiesel-based microemulsions have unique advantages in the treatment of petroleum-contaminated soils, thanks to their ultra-low interfacial tension and strong solubility. By studying the effects of different solvents, surfactants, and co-surfactants on the phase transition of the microemulsion, and comparing the effects of temperature, solid-liquid ratio, and treatment time on washing efficiency, we successfully obtained the composition of a biodiesel-based microemulsion system with high stability and optimized washing conditions. At the same time, the deactivation mechanism in the washing process of the microemulsion was analyzed. The experimental results showed that the biodiesel microemulsion, composed of SDBS as a surfactant and n-butanol as a co-surfactant, exhibited excellent washing stability. The optimized washing conditions were as follows: temperature of 35℃, 1:5 solid-liquid ratio, and 30-minute treatment time. Under these conditions, the oil removal rate reached as high as 73.6%. The reasons for the microemulsion inactivation may be as follows: (1) Composition loss of the microemulsion during the washing process leads to a reduction in washing efficiency; (2) During the washing process, solid particles formed a hard shell on the surface of the microemulsion droplets, reducing the washing efficiency; (3) Oil components eluted from the soil entered the oil phase of the microemulsion, changing the oil phase composition and resulting in decreased washing efficiency.