The invention discloses a method for detecting myrcene in soil by combining purging and trapping with GC-MS. The method comprises the following steps: firstly, collecting a soil or sediment sample, removing foreign matters, and adding 5.0 g of the sample into 5mL of ultrapure water; then placing the obtained sample in a purging and trapping sample injector, setting purging and trapping conditions to perform purging and trapping on the sample, purging myrcene in the sample out and entering a gas chromatograph-mass spectrometer, and setting chromatographic conditions of the gas chromatograph-mass spectrometer to analyze myrcene. According to the method, purging and trapping are combined with GC-MS, the detection efficiency is improved, the detection precision is greatly improved, the method is low in detection limit and good in repeatability, and myrcene in soil or sediment can be independently detected with high precision.