Many solid-phase microextraction (SPME) sorbents have been developed from aerogels because of their low densities, large surface areas, and high porosities. Melamine-formaldehyde (MF) aerogel, made from melamine and formaldehyde by a sol-gel reaction, is one of the typical organic aerogels. MF aerogel has better mechanical strength, chemical stability and extraction performance than inorganic aerogels. The performance of the aerogel is limited in some fields, while composite aerogels can meet different requirements such as good mechanical strength and strong adsorption performance. Graphene oxide (GO) is a two-dimensional nanomaterial composed of a single layer of carbon atoms and provides π-π interaction by a large π-electron. In addition, the oxygen-containing groups at the edge of the lamellar structure improve the hydrophilicity of the material and can interact with various compounds. To improve the extraction performance of MF aerogel for polycyclic aromatic hydrocarbons (PAHs), GO/MF aerogels were prepared by functionalizing MF aerogel with GO. In this study, 1.2612 g of melamine and 80 mg of sodium carbonate were dissolved in 30 mL of water, and the mixture was heated to 80 ℃ under stirring. Then, 2.8 mL formaldehyde solution (37%) was slowly added, and a clear solution was obtained gradually. Next, 50 mg of GO powder was ultrasonically dispersed in 10.0 mL of water and evenly mixed with the above solution. After adjusting the pH to 1.5, the sol-gel process was performed for 48 h, then the gel was aged at room temperature for 24 h. The gel was then soaked in ethanol, acetone, and cyclohexane in turn to replace the solvent. Finally, the GO/MF aerogel was obtained by freeze-drying for 24 h. The GO/MF aerogel was characterized by scanning electron microscopy (SEM) and X-ray photoelectric spectroscopy (XPS), confirming that GO was successfully introduced into MF aerogel, while retaining its three-dimensional network and porous structure. GO/MF aerogel was coated onto the surface of a stainless steel wire to be used as sorbent. Four such wires were placed into a polyetheretherketone (PEEK) tube (0.75 mm i. d., 30 cm length) for in-tube (IT) SPME. The tube was combined with a high-performance liquid chromatography (HPLC) unit to construct an IT-SPME-HPLC online system. When the six-way valve was in the Load state, sample solution achieved online enrichment with analytes while it flowed through the extraction tube. After extraction, the valve was turned to the Inject state, and the analytes were eluted into the chromatographic column by the mobile phase at a flow rate of 1.0 mL/min for separation and detection with the detector. Under the same extraction conditions (sampling volume=30 mL, sampling rate=1.00 mL/min, and concentration of polycyclic aromatic hydrocarbons (PAHs, viz. naphthalene (Nap), acenaphthylene (Acy), acenaphthene (Ace), fluorine (Flu), phenanthrene (Phe), anthracene (Ant), fluoranthene (Fla) and pyrene (Pyr))=5.00 μg/L), GO/MF aerogel-based tube was compared with that of MF aerogel-based tube. GO enhanced the enrichment efficiency of MF aerogel towards PAHs from 1.1 to 2.5 times, due to the increased number of adsorption sites and enhanced π-π interaction with PAHs. IT-SPME was affected by the sampling volume, sampling rate, concentration of organic solvent in sample, desorption solvent, desorption rate, and desorption time. To obtain accurate results, the main extraction and desorption conditions (sampling volume, sampling rate, organic solvent concentration, desorption time) were investigated carefully. As the sampling volume in the extraction tube was increased, the extraction efficiency was found to increase gradually until saturation. In this study, the extraction efficiency was investigated for sampling volumes ranging from 30 to 80 mL, and 70 mL was selected as a suitable sampling volume to achieve satisfactory extraction efficiency. The sampling rate affects not only the extraction efficiency, but also the extraction time. When the sample flows through the extraction tube at a low rate, it requires a long test time. Although the increase in sampling rate reduces the extraction time, it often decreases extraction efficiency. In addition, large sampling rate leads to high pressure in the tube, which in turn reduces the service life of the tube. Therefore, the effect of sampling rate (1.25-2.50 mL/min) on extraction efficiency was investigated, and good extraction efficiency and short test time were achieved when the sampling rate was 2 mL/min. High hydrophobic PAHs have poor solubility in water. An appropriate amount of organic solvent in the sample solution can improve the solubility of PAHs to obtain accurate analytical results. However, the extraction efficiency was affected by the added organic solvent. Thus, the effect of volume fraction of methanol (0, 0.5%, 1%, 2%, 3%, and 5%, v/v) on the extraction efficiency was investigated. The sample solution without methanol afforded better extraction efficiency and satisfactory repeatability. After online extraction, the desorption directly affects the desorption efficiency. The peak areas of the eight PAHs were investigated with different desorption times (0.2, 0.4, 0.6, 0.8, 1.0, and 2.0 min), and a desorption time of 2.0 min was required to fully desorb all analytes and reduce their residuals. The IT-SPME-HPLC-DAD method was established under the optimized conditions, and the limits of detection (LODs), linear equations, linear ranges, and correlation coefficients were obtained. The LODs of the eight PAHs were in the range of 0.001-0.005 μg/L, the quantitative ranges of the analytes were 0.003-15.0 μg/L for Fla and Pyr, 0.010-20.0 μg/L for Phe and Ant, and 0.017-20.0 μg/L for Nap, Acy, Ace and Flu, the enrichment factors were in the range of 2029-2875, and the analytical precision was satisfactory (intra-day RSD%≤4.8%, and inter-day RSD≤8.6%). Compared with some reported methods, the method reported herein provided higher sensitivity, wider linear range, and shorter test time. This method was applied to the detection of PAHs in common drinking water, including bottled mineral water and water from drinking fountain. The satisfactory recovery (76.3%-132.8%) obtained proves that the method is suitable for the determination of trace PAHs in real water samples, with high sensitivity, rapid testing, online detection, and good accuracy. The extraction tube also exhibited satisfactory durability and chemical stability.