Fentanyl is commonly administered for procedural pain management in preterm infants, but target concentrations have not yet been defined. To investigate pharmacokinetics (PK), -dynamics (PD), and -genetics (PG), 25 infants (gestational age 23.3-34.1 weeks) received a fentanyl dose before a skin-breaking procedure (0.5 µg/kg) or tracheal intubation (2 µg/kg). Four pain scales were used as a PD endpoint to evaluate efficacy. The impact of polymorphism in genes encoding enzymes (UGT2B7, CYP3A7, CYP3A4, COMT, CYP2D6, KCNJ6), transporters (SLC22A1, ABCC1, ABCC3) and receptor (OPRM1) on PK parameters was explored. A two-compartment PK model adequately described the fentanyl concentration. The effects of weight and maturity on the clearance were included as covariates in the model. One genetic variant encoding the ABCC1 transporter (rs111517339 T/TA) and two encoding the ABCC3 transporter (rs11079921 T/C and rs8077268 C/T) had a significant effect on fentanyl elimination that explained 15% of the interindividual variability on the clearance. A proportional odds PK/PD model was used to describe the concentration-effect relationship of fentanyl using the Échelle de douleur et d'inconfort du nouveau-né (EDIN) pain score. The simulations suggest that an intravenous dose of 2 µg/kg would be appropriate in preterm infants for a clearly painful procedure, such as an intubation. Design of personalized analgesia with fentanyl for newborn infants should consider maturation and genetic variants of opioid transporters affecting drug elimination. The results indicate that an intravenous dose of 2 μg/kg fentanyl would be suitable before a clearly painful procedure in preterm infants. Genetic variants encoding ABCC1 and ABCC3 transporters increase the clearance of fentanyl, which is a novel finding.