The volatile compounds emitted from Mosla chinensis Maxim were analyzed by headspace solid-phase microextraction (HS-SPME) and headspace liquid-phase microextraction (HS-LPME) combined with gas chromatography-mass spectrometry (GC-MS). The main volatiles from Mosla chinensis Maxim were studied in this paper. It can be seen that 61 compounds were separated and identified. Forty-nine volatile compounds were identified by SPME method, mainly including myrcene, α-terpinene, p-cymene, (E)-ocimene, thymol, thymol acetate and (E)-β-farnesene. Forty-five major volatile compounds were identified by LPME method, including α-thujene, α-pinene, camphene, butanoic acid, 2-methylpropyl ester, myrcene, butanoic acid, butyl ester, α-terpinene, p-cymene, (E)-ocimene, butane, 1,1-dibutoxy-, thymol, thymol acetate and (E)-β-farnesene. After analyzing the volatile compounds, multiple linear regression (MLR) method was used for building the regression model. Then the quantitative structure-retention relationship (QSRR) model was validated by predictive-ability test. The prediction results were in good agreement with the experimental values. The results demonstrated that headspace SPME-GC-MS and LPME-GC-MS are the simple, rapid and easy sample enrichment technique suitable for analysis of volatile compounds. This investigation provided an effective method for predicting the retention indices of new compounds even in the absence of the standard candidates.