A fully automated procedure using alkaline hydrolysis and headspace solid-phase microextraction (HS-SPME), followed by on-fiber derivatization and gas chromatographic–mass spectrometric (GC–MS) detection has been developed for determination of cannabinoids in hemp food samples. After addition of a deuterated internal standard, the sample was hydrolyzed with sodium hydroxide and submitted to direct HS-SPME. After absorption of analytes for on-fiber derivatization, the fiber was placed directly into the headspace of a second vial containing N-methyl-N-trimethylsilyltrifluoroacetamide (MSTFA), before GC–MS analysis. Linearity was good for Δ
9-tetrahydrocannabinol (THC), cannabidiol, and cannabinol; regression coefficients were greater than 0.99. Depending on the characteristics of the matrix the detection limits obtained ranged between 0.01 and 0.17 mg kg−1 and the precision between 0.4 and 11.8%. In comparison with conventional liquid–liquid extraction this automated HS-SPME–GC–MS procedure is substantially faster. It is easy to perform, solvent-free, and sample quantities are minimal, yet it maintains the same sensitivity and reproducibility. The applicability was demonstrated by analysis of 30 hemp food samples. Cannabinoids were detected in all of the samples and it was possible to differentiate between drug-type and fiber-type Cannabis sativa L. In comparison with other studies relatively low THC concentrations between 0.01 and 15.53 mg kg−1 were determined.