Although pollution during crude oil production has been paid attention, there is lack of studies on organic pollutants generated/emitted from oil-production wastewater (OPW) treatment processes, especially advanced oxidation process. Based on GC-Q-Orbitrap-HRMS, the present study performed non-target analysis of volatile/semi-volatile organic compounds in physical and electro-oxidation units of OPW treatment stations located in Shengli Oilfield of China. Overall, 64–227 organic compounds were respectively identified in different units, and electro-oxidation was found elevating (by 2.7–66 times) specie numbers (25–71) of CHO, CHNO and halogenated compounds as well as inducing generation of 38 alkanes and 6 alkyl-PAHs in wastewater, indicating the important roles of reactive oxygen and halogen species in pollutant transformation. In soils (n = 22) closed to OPW treatment stations, 580 compounds were identified with hydrocarbons (45%), esters (24.3%), and others (30.7%, including aldehydes, ketones, phenols, amines, nitriles and heteroatomic compounds), while esters had largest concentration contribution (up to 53.0%) to total compounds. The calculated hazard quotients (HQ) showed 55 compounds in OPW effluents and 314 compounds in soils having medium-high risks, considerable portions of which (23.6% for effluent and 12.7% for soil) were generated from electro-oxidation process, especially including esters and halogenated hydrocarbons, highlighting the contribution of OPW electro-oxidation treatment to ecological risk in oil-production areas.