The present study is interested in removal of a cationic dye gentian violet (GV) using a polystyrene membrane (PS) activated with oleic acid (OA). These innovative membranes were developed by using PS as the base polymer and OA as extractant. The best matrix obtained was characterized by using Fourier transform infrared spectroscopy (FTIR) and x‐ray diffraction (XRD), and then applied in the extraction of a cationic GV dye. The effects of an extraction ratio (OA/PS) in the PS‐AO matrix, initial GV dye concentration ([GV]0), and pH of the solution were studied in a batch reactor. The thermodynamic parameters (, , and ) have been calculated. Therefore, the GV extraction onto the PS‐OA matrix is an exothermic and spontaneous process. In addition, the slop method confirms that the chemical formula of the extracted OA‐GV complex is GV‐RHR. The central composite design (CCD) was used to determine the conditions of each experimental run, and extraction optimization was achieved using response surface methodology (RSM). The results showed that the quadratic regression model was statistically significant (0.9994), and the parameters studied had a profound effect on the extraction efficiency. The optimum GV extraction efficiency of 99% was achieved at an extractant ratio of 1, pH of 8, and [GV]0 of 10 mg L−1. The findings of the current study reveal that PS‐AO matrix is an advantageous and effective membrane for the extraction of GV from aqueous solutions, both environmentally and economically, it can be regenerated and used up to five times.