One of the most dangerous organic compounds to the environment is gasoline emulsions, discharged without prior treatment by most oil refining industries. This study focuses on the modification of bentonite clays by acid and thermal activation to maximize their adsorption capacity for treating refinery wastewater. The surface properties and porous structure of the adsorbents were investigated with the use of BET, SEM, FTIR, XRD, XRF, EDX, and MAP methods. Based on the results of BET analysis, the surface area of the raw bentonite (RB) and activated bentonite (AB) was (17.57, 69.72) m2 /g. The four independent variables, namely the initial gasoline concentration (200–1000 mg/L), solution pH (3−9), contact time (30–120 min), and adsorbent dosage (ranging from 0.05 to 0.15 g/L). According to the results, the maximal adsorption capacity (74.6.38, 138 mg/g) by RB and AB was achieved using the following optimized conditions: initial COD gasoline concentration of 1000 mg/L, pH= 6 for RB and pH= 3 for AB, contact time 120 min, and adsorbent dosage 0.15 g for RB and AB. Additionally, the kinetic and equilibrium studies demonstrated that the present adsorption process's kinetics and equilibrium behavior were adequately represented by the pseudo second-order kinetic model and the Langmuir isotherm. The data by Langmuir isotherm showed that the maximum adsorption capacity for RB and AB was equal to 83 and 140.84 mg/g, respectively. Furthermore, thermodynamic studies demonstrated that the present adsorption procedures were both spontaneous and endothermic. The mechanism of gasoline adsorption onto RB and AB was effectively investigated with the assistance of characterization techniques. The current study demonstrates that RB and AB can be utilized as adsorbents for the elimination of gasoline with high efficiency.