A procedure based on liquid chromatography-mass spectrometry (LC-MS) is described for determination of 6-monoacetylmorphine, morphine, morphine-3-glucuronide, morphine-6-glucuronide, codeine, cocaine, benzoylecgonine and cocaethylene in meconium using nalorfine as the internal standard. The analytes are initially extracted from the matrix by methanol (6-monoacetylmorphine, morphine, codeine, cocaine, benzoylecgonine and cocaethylene) or 0.01 M ammonium hydrogen carbonate buffer (morphine-3-glucuronide, morphine-6-glucuronide). Subsequently a solid-phase extraction with Bondelut Certify columns (6-monoacetylmorphine, morphine, codeine, cocaine, benzoylecgonine and cocaethylene) or ethyl solid-phase extraction columns (morphine-3-glucuronide, morphine-6-glucuronide) was applied. Chromatography was performed on a C(8) reversed-phase column using a gradient of acetic acid 1%-acetonitrile as a mobile phase. Analytes were determined in LC-MS single ion monitoring mode with atmospheric pressure ionisation-electrospray (ESI) interface. The method was validated in the range 0.005-1.00 microg/g using 1 g of meconium per assay and applied to analysis of meconium in newborns to assess fetal exposure to opiates and cocaine.