This study, for the first time, rendered crab shell activated biochar modified by potassium hydroxide (KOH) impregnation (CSAB), revealing a new potential application in the removal of diesel oil from oily wastewater. The structural characteristics of crab shell biochar (CSB) and CSAB were investigated by SEM, and the crystal structure and optical properties of as-prepared samples were analyzed using XRD and FTIR. Results showed that CSAB had stratified surface structure morphology, abundant functional groups, and that its high specific surface area could reach up to 2441 m2/g, which was about eight times larger than that of untreated CSB (307 m2/g). An adsorption isotherm study indicated that the actual adsorption process both of CSAB and CSB were found to fit better with the Freundlich equation. Moreover, chemical interaction controlled the adsorption kinetics efficiency while the adsorption equilibrium capacity was 93.9 mg/g. Due to its highly developed pore structure, unique surface characteristics, and effective adsorption performance, this low-cost activated carbon had the potential to serve as an efficient adsorbent for water pollution purification.