A novel analytical method coupling gas chromatography (GC) with single photon ionization time-of-flight mass spectrometry (SPI-TOF MS) has been developed. First of all, a double-wall-tube transfer line was built to combine GC with SPI-TOF MS, which realized seamless connection between GC and SPI ion source. Based on this, standard n-pentadecane and benzene/toluene/xylene standard gas mixtures were used to study important voltage parameters of the ion source. After the optimization of the ion source voltages, pure molecular ion peaks of the analytes were obtained in the mass spectra and qualitative analysis of different kinds of organic compounds were eventually realized rapidly and accurately. At last, GC/SPI-TOF MS was applied to the characterization of volatile and semvolatile organic compounds in diesel and two-dimensional spectra of GC×SPI-TOF MS were obtained. Without complicated spectra interpretation and data processing, volatile and semi-volatile organic compounds in diesel have been classified qualitatively by ion mass-to-charge ratio (m/z) in SPI mass spectra, including aliphatic compounds, aromatic compounds and nitrogen-containing compounds with low concentration such as benzopyrroles. Isomeric compounds in diesel were separated and identified by retention times of chromatographic peaks. The results indicate that the proposed analytical method of GC/SPI-TOF MS is suitable for the characterization of complicated samples such as diesel and environmental pollutants with easy operation and high efficiency.