In this study, we examined a model that describes both direct and indirect pathways between children's temperament and activity of the hypothalamic-pituitary-adrenal (HPA) axis when children are in peer-group settings. We hypothesize that in peer-group settings both shy, inhibited and exuberant, undercontrolled children would exhibit higher cortisol levels, but these associations would operate through different pathways. Sociometric measures of peer rejection, salivary cortisol, and teacher reports of temperament were collected on 82 preschoolers. Children who were rejected by classmates had higher cortisol levels than the other children. The combination of Surgency and Poor Effortful Control (Effortful Control, reverse scored) was associated with elevated cortisol through a pathway mediated by aggressive interactions with peers and peer rejection. With the indirect path explained, the combination of Surgency and Poor Effortful Control also was directly and negatively associated with classroom cortisol levels. These results help explain why temperament associations with HPA activity, have been variable and difficult to discern when children are assessed in peer-group contexts. In these contexts, both direct and indirect pathways between temperament and cortisol need to be examined.