Gold nanoparticles (AuNPs) were in-situ deposited onto the ordered mesoporous carbon (OMC) to function as a novel SPME coating. The specific area, pore volumes and average pore diameter for OMC and AuNP/OMC were calculated to be 411 and 281 m2 g−1, 0.93 and 0.69 cm3 g−1, 7.1 and 6.8 nm, respectively. The results indicate that the introduction of AuNPs greatly enhances the extraction of anilines, probably due to the strong interaction between gold and amino groups. The composite material was coated onto a fiber which then gave enrichment factors in the range from 1143 to 3420 for anilines, 45 to 845 for alcohols and 86 to 545 for phenols, indicating its extraction selectivity towards aniline. Following desorption, four anilines were quantified by gas chromatography with flame ionization detection. The method has low limits of detection (0.072-0.18 μg L−1) and a good precision (1.9-3.8%). It was successfully applied to the analysis of anilines in river and drinking samples. Recoveries range from 83.9% to 107.7% and 94.0 to 113.1%, respectively.