The re-use of wastewater has been in growing demand but a possible negative feature is the possibility of organic pollutants being present after its treatment. In order to control the presence of contaminants in wastewater, a completely automated methodology capable of determining a total of 55 organic pollutants including pesticides, polycyclic aromatic hydrocarbons (PAHs), brominated diphenyl ethers (BDEs) and polychlorinated biphenyls (PCBs) at ultra-trace levels has been developed. The proposed method is based on an on-line combination of headspace solid phase microextraction (HS-SPME) and gas chromatography coupled to double-focusing magnetic sector high resolution mass spectrometry (GC-HRMS). HS-SPME as well as GC-HRMS conditions were optimized so as to achieve maximum extraction efficiency and sensitivity which was reinforced by using multiple ion detection (MID) as acquisition mode. Special attention was directed to fiber conditioning and stability by calorimetric and scanning electron microscopy (SEM) analysis. Method validation showed good linearity (R2 > 0.99), recoveries between 86 and 113%, relative standard deviation (RSD) values < 20% for intra-day and inter-day precision and quantification limits (LOQs) between 0.01 and 350 ng L-1. Finally, the proposed method was successfully applied to wastewater samples revealing the presence of PAHs and PCBsS and certain pesticides, mainly anthracene, chlorpyrifos, p,p'-DDD and p,p'-DDT and the metabolite p,p'-DDE.