Methadone and buprenorphine are widely used for treating people with opioid dependence, including pregnant women. Prenatal exposure to opioids has devastating effects on the development of human fetuses and may induce long-term physical and neurobehavioral changes during postnatal maturation. This study aimed at comparing the behavioral outcomes of young rats prenatally exposed to buprenorphine, methadone, and morphine. Pregnant Sprague-Dawley rats were administered saline, morphine, methadone, and buprenorphine during embryonic days 3–20. The cognitive function, social interaction, anxiety-like behaviors, and locomotor activity of offsprings were examined by novel object recognition test, social interaction test, light–dark transition test, elevated plus-maze, and open-field test between 6 weeks and 10 weeks of age. Prenatal exposure to methadone and buprenorphine did not affect locomotor activity, but significantly impaired novel object recognition and social interaction in both male and female offsprings in the same manner as morphine. Although prenatal exposure to methadone or buprenorphine increased anxiety-like behaviors in the light–dark transition in both male and female offsprings, the effects were less pronounced as compared to that of morphine. Methadone affected elevated plus-maze in both sex, but buprenorphine only affected the female offsprings. These findings suggest that buprenorphine and methadone maintenance therapy for pregnant women, like morphine, produced detrimental effects on cognitive function and social behaviors, whereas the offsprings of such women might have a lower risk of developing anxiety disorders.