Most polycyclic aromatic hydrocarbons (PAHs), which are persistent organic pollutants, have strong carcinogenicity, teratogenicity, and mutagenicity, and pose serious threats to the ecological environment and human health. Owing to the complexity of the matrix and low PAH content of environmental samples, separating and enriching PAHs in environmental samples is necessary prior to their detection. Solid-phase microextraction (SPME) technology is commonly used to detect PAHs owing to its advantages of simple operation, online connection with other instruments, low solvent usage, and integrability of sampling separation, enrichment, and desorption. The extraction coating is the core of this technology, and the type and thickness of the coating are important factors affecting the sensitivity and accuracy of the analysis. Common commercial extraction coatings include polydimethylsiloxane and quartz fiber; however, these materials have a number of disadvantages, such as poor thermal stability and high cost. Several methods, including electrochemical, sol-gel, molecular imprinting, and other coating methods, have been developed to prepare SPME coatings. Electrochemical methods have attracted considerable attention because of their simplicity, short duration, and high coating stability. In the development of an electrochemical method, the selection of the conductive polymer is of particular importance. Polypyrroles (Ppy) are easily synthesized and have numerous advantages, such as good conductivity and stable chemical properties. Thus, their use as a substrate material for SPME coatings is beneficial for improving the overall stability of the coating. Copolymerization with other polymers can enhance the adsorption performance of such coatings via synergistic effects. When doped with inorganic materials with high thermal stability, the composite coating can exhibit high temperature resistance. In this study, a porous boron nitride-doped Ppy-2,3,3-trimethylindole (Ppy/P2,3,3-TMe@In/BN) composite was prepared as a new SPME copolymer coating to detect three PAHs: naphthalene (NAP), acenaphthene (ANY), and fluorene (FLU). Scanning electron microscopy, thermal stability analysis, Fourier transform infrared spectroscopy, and other techniques were used to characterize the Ppy/P2,3,3-TMe@In/BN composite coating. The results showed that the coating featured a large number of porous and wrinkled dendritic structures, which increased the specific surface area of the composite coating and enabled the extensive enrichment of the three PAHs. When the sample inlet temperature of the chromatograph is 320 ℃, the chromatographic baseline of the coating is basically stable. Compared with commercial coatings, the prepared coating had better thermal stability. The coating formed stable intermolecular forces with the three PAHs owing to its numerous carbon-carbon double bonds (C=C), hydrogen bonds, and other structures, thereby achieving excellent enrichment of the target analytes. Compared with Ppy, Ppy/PIn, Ppy/P2,3,3-TMe@In, Ppy/BN, and polydimethylsiloxane (PDMS) coatings, the prepared Ppy/P2,3,3-TMe@In/BN composite coating exhibited better extraction effects for the three PAHs. The Ppy/P2,3,3-TMe@In/BN composite coating was polymerized on the surface of a stainless-steel wire by cyclic voltammetry and combined with gas chromatography-hydrogen flame ionization detection (GC-FID) to optimize the conditions influencing the extraction and separation of the three PAHs, thereby establishing a highly sensitive analytical method for detecting NAP, ANY, and FLU. This method had low limits of detection (LODs) of 10.6-14.5 ng/L (S/N=3) and high stability. The SPME-GC-FID method was used to detect the three PAHs in two environmental water samples, and a small amount of ANY (1.39 μg/L) was detected in one water sample. Satisfactory recoveries (82.5%-113.9%) were obtained when both water samples were spiked with the three PAHs at three levels. The experimental results indicate that the established analytical method can detect the three PAHs in environmental water samples.