Determining matric suction in diesel-contaminated soil within unsaturated regions is essential for simulating the diesel remediation process. Existing literature methods are limited to measuring changes in total liquid content in soil under constant suctions, and cannot differentiate between changes in diesel or water content. In this study, a method was proposed to invert the matric suction of unsaturated soil with varying water and diesel contents, based on the theoretical relationship between matric suction and direct shear strength parameters. On this basis, the evolutionary behaviors of matric suction for diesel-contaminated soil are studied. The results show that, the water in diesel-contaminated soil primarily resides on the surface of soil particles, while diesel is present within the interstitial pores. The MVG model can better predict the change in matric suction of diesel contaminated soil, but can not well describe the matric suction of each liquid in the soil. The change in soil matric suction caused by reducing the water content is greater than that of reducing the same diesel content. There is little correlation between the residual liquid content of soil and whether it is filled with water or diesel.