Fentanyl is an agonist of the μ‐opioid receptor commonly used in the treatment of moderate‐severe pain. In order to study whether pharmacogenetics explains some of the variability in the response to fentanyl, several genes related to fentanyl receptors, transporters and metabolic enzymes have been analysed. Thirty‐five healthy volunteers (19 men and 16 women) receiving a single 300 μg oral dose of fentanyl were genotyped for 9 polymorphisms in cytochrome P450 (CYP) enzymes (CYP3A4 and CYP3A5), ATP‐binding cassette subfamily B member 1 (ABCB1), opioid receptor mu 1 (OPRM1), catechol‐O‐methyltransferase (COMT) and adrenoceptor beta 2 (ADRB2) by real‐time PCR. Fentanyl concentrations were measured by ultra‐performance liquid chromatography combined with tandem mass spectrometry (UPLC‐MS/MS). Fentanyl pharmacokinetics is affected by sex. Carriers of the CYP3A4*22 allele, which is known to reduce the mRNA expression, showed higher area under the concentration‐time curve (AUC) and lower clearance (Cl) values. Although this finding might be of importance, its validity needs to be confirmed in other similar settings. Furthermore, carriers of the ABCB1 C1236T T/T genotype presented a lower AUC and higher Cl, as well as lower half‐life (T1/2). As volunteers were blocked with naltrexone, the effect of fentanyl on pharmacodynamics might be biased; however, we could observe that fentanyl had a hypotensive effect. Moreover, ADRB2 C523A A allele carriers showed a tendency towards reducing systolic blood pressure. Likewise, OPRM1 and COMT minor allele variants were risk factors for the development of somnolence. CYP3A5*3, ABCB1 C3435T and ABCB1 G2677T/A were not associated with fentanyl's pharmacokinetics, pharmacodynamics and safety profile.