In this paper, a headspace solid-phase microextraction (HS-SPME) coupled to gas chromatography-mass spectrometry (GC-MS) was applied for the analysis of volatile compounds in a famous compounded Chinese medicinal prescription, Xiao-Cheng-Qi-Tang. Some parameters affecting the extraction efficiency such as stirring, extraction temperature, fiber exposure time and desorption time were optimized. The best results were obtained using a 100 microm PDMS fiber during headspace extraction at 90 degrees C with stirring at 1000 rpm for 20 min. Twenty-seven compounds were identified in Xiao-Cheng-Qi-Tang including some main compounds such as d-limonene and linalool. Inter- and intra-day relative standard deviations (R.S.Ds.) were less than 15.6%, showing that the method had a good reproducibility. The result might provide some foundation for building the convincing theory on the pharmacological activity of this prescription.