Produced water (PW) is a type of wastewater that arises during oil and gas production. Due to its potential environmental impact, PW is one of the most closely monitored forms of wastewater in the petroleum industry. The total oil and grease (TOG) content in the water is a crucial parameter for assessing the environmental impact of PW. Traditional methods for analyzing TOG in PW can be time-consuming and may not be compatible with green chemistry principles. In this study, an alternative method for classifying PW samples is proposed using a one-class classifier (OCC) model, which has proven useful for classification problems. To achieve this goal, headspace solid-phase microextraction (HS-SPME) combined with comprehensive two-dimensional gas chromatography (GC×GC) were employed to obtain TOG profiles from PW. A series of simulated PW samples containing TOG were generated using a mixture design comprising four petrochemicals at concentrations ranging from 10 mg L-1 to 50 mg L-1. The polydimethylsiloxane (PDMS) fiber showed the most representative extraction of analytes. The optimization of the HS-SPME method was performed using a Doehlert design with two variables, and the final conditions were set at 80 °C and 70 min for extraction temperature and time, respectively. A pixel-based data approach was used to implement data-driven soft independent modeling by class analogy (DD-SIMCA). Although DD-SIMCA is a developing area in GC×GC studies, the proposed model produced outstanding results with a sensitivity of 94.3 %, specificity of 95.0 %, and accuracy of 94.5 %, considering the complex and broad compositional range of the modeled mixtures. These findings demonstrated the effectiveness of the OCC model approach in classifying PW samples according to environmental regulations.