Impaired memory performance in offspring is one of the long-lasting neurobehavioral consequences of prenatal opiate exposure. Here, we studied the effects of prenatal morphine exposure on inhibitory avoidance memory performance in male and female offspring and also investigated whether these deficits are reversible during the postnatal development. Pregnant Wistar rats received morphine sulfate through drinking water, from the first day of gestation up to the day 13, M₁₋₁₃, or to the time of delivery, M₁₋₂₁. Four- and ten-week-old (adolescent and adult, respectively) male and female offspring were subjected to behavioral assays and then analysis of proteins involved in apoptosis or in synaptic plasticity. Results revealed that adolescent and adult female rats failed in passive avoidance retention task in both M₁₋₁₃ and M₁₋₂₁ groups. Adolescent and adult male offspring were similar to control animals in M₁₋₁₃ group. However M₁₋₂₁ impaired retention task in prepubertal male offspring, and this memory loss was repaired in postpubertal stage. Consistently, Bax/Bcl-2 ratio and cleaved caspase-3 were significantly increased in both M₁₋₁₃ and M₁₋₂₁ adolescent and adult female rats, but only in M₁₋₂₁ adolescent male rats. Furthermore, prenatal morphine exposure reduced the expression of brain-derived neurotrophic factor precursor protein in adolescent and adult female offspring and also decreased p-ca(2+)/calmodulin-dependent kinase II/ca(2+)/calmodulin-dependent kinase II ratio in adolescent male and female rats. Altogether, the results show that prenatal morphine exposure, depending on the time or duration of exposure, has distinct effects on male and female rats, and postnatal development may reverse these deficits more likely in males.