The effects of castration and testosterone replacement on hypothalamic pools of beta-endorphin and dynorphin and on the basal and corticotropin-releasing factor (CRF)-stimulated release of these peptides from hypothalamic slices in vitro were studied. The experiments were done in adult male rats. The hypothalamic content of both peptides increased significantly within 1 week of castration, and levels remained elevated for up to 4 weeks. Testosterone treatment, begun at the time of castration, prevented these increases. In addition, testosterone replacement 6 weeks after castration reversed peptide levels to normal. Basal in vitro release rates of beta-endorphin and dynorphin were significantly lower from hypothalamic slices derived from 1-week castrated animals than from intact males, and when testosterone was administered in various doses in vivo, basal release rates in vitro increased in a dose-related manner. Hypothalami from rats that had been castrated for 4 weeks, however, showed basal release rates similar to those in tissues from intact controls, a finding indicating that castration initially alters both opioid peptide synthesis and release; later, release is normalized, whereas synthesis remains elevated. CRF was found to stimulate beta-endorphin and dynorphin release from hypothalami from intact and from 1- and 4-week-castrated rats, a result indicating that castration does not alter the response of beta-endorphin and dynorphin neurons to this stimulus.