We synthesized a titanium dioxide-polyaniline core-shell nanocomposite and implemented it as an efficient sorbent for the needle-trap extraction of some volatile organic compounds from urine samples. Polyaniline was synthesized, in the form of the emeraldine base, dissolved in dimethyl acetamide followed by diluting with water at pH 2.8, using the interfacial polymerization method. The TiO nanoparticles were encapsulated inside the conducting polymer shell, by adapting the in situ dispersing approach. The surface characteristics of the nanocomposite were investigated by Fourier transform infrared spectrometry, scanning electron microscopy, and transmission electron microscopy. After obtaining acceptable preliminary results, some selected volatile compounds, including chloroform, benzene, toluene, ethylbenzene, xylene, and chlorobenzenes were used as model analytes to validate the enrichment properties of the prepared sorbent in conjunction with gas chromatography mass spectrometric detection. Important parameters influencing the extraction process such as extraction temperature, ionic strength, sampling flow rate, extraction time, desorption temperature, and time were optimized. The limits of detection and limits of quantification values were in the range of 0.5-3 and 2-5 ng/L, respectively, using time-scheduled selected ion monitoring mode. The relative standard deviation percent with three replicates was in the range of 5-10%. The applicability of the developed needle-trap method was examined by analyzing urine samples and the relative recovery percentages for the spiked samples were in the range of 81-105%.