The primary objective of this study was to investigate the effect of biochar, produced from wheat residue at different temperatures, on the adsorption of diesel oil by loess soil. Kinetic and equilibrium data were processed to understand the adsorption mechanism of diesel by biochar-affected loess soil; dynamic and thermodynamic adsorption experiments were conducted to characterize this adsorption. The surface features and chemical structure of biochar, modified at varying pyrolytic temperatures, were investigated using surface scanning electron microscopy and Fourier transform infrared analysis. The kinetic data showed that the adsorption of diesel oil onto loess soil could be described by a pseudo-second-order kinetic model, with the rate-controlling step being intraparticle diffusion. However, in the presence of biochar, boundary layer control and intraparticle diffusion were both involved in the adsorption. Besides, the adsorption equilibrium data were well described by the Freundlich isothermal model. The saturated adsorption capacity weakened as temperature increased, suggesting a spontaneous exothermic process. Thermodynamic parameter analysis showed that adsorption was mainly a physical process and was enhanced by chemical adsorption. The adsorption capacity of loess soil for diesel oil was weakened with increasing pH. The biochar produced by pyrolytic wheat residue increased the adsorption behavior of petroleum pollutants in loess soil.