We assessed the neurochemical basis of olfactory learning induced by presentations of odor and moderate shock in infant rats. Paradoxically, shock conditioning produces an odor preference in 8-day-olds, but an odor aversion in 12-day-olds. Studies have demonstrated the importance of opioids in early olfactory learning; their specific role remains undefined. In this study, postnatal Days 8 and 12 pups were systemically injected with naltrexone, a nonspecific opioid antagonist, or saline and received either paired or backward presentations of odor-moderate shock or odor-only presentations. Blocking the opioid system during conditioning disrupted acquisition of the Day 8 odor preference, but not the Day 12 odor aversion. Additional Day 8 pups were given naltrexone posttraining. Naltrexone not only blocked consolidation of an odor preference but also yielded an odor aversion. These results suggest that the opioid system has a critical role in both olfactory learning and consolidation of odor preferences during the sensitive period.