Over recent years, hair has become the ideal matrix for retrospective investigation of chronic abuse, including for tramadol. However, in order to exclude the possibility of external contamination, it is also important to quantify simultaneously its main metabolite, O-desmethyltramadol (M1), which presence in hair reflects systemic exposure. In the present study a methodology aimed at the simultaneous quantification of tramadol and M1 in human hair was developed and validated for the first time. After decontamination of hair samples (60 mg), tramadol and M1 were extracted with methanol in an ultrasonic bath (~5 h). Purification was performed by solid-phase extraction using mixed-mode extraction cartridges. Subsequently to derivatization, analysis was performed by gas chromatography-electron impact/mass spectrometry (GC-EI/MS). The method proved to be selective. The regression analysis for both analytes was shown to be linear in the range of 0.1-20.0 ng/mg with correlation coefficients of 0.9995 and 0.9997 for tramadol and M1, respectively. The coefficients of variation oscillated between 3.85 and 13.24%. The limits of detection were 0.03 and 0.02 ng/mg, and the lower limits of quantification were 0.08 and 0.06 ng/mg for tramadol and M1, respectively. The proof of applicability was performed in hair samples from six patients undergoing tramadol therapy. All samples were positive for tramadol and M1.