Adverse experiences in early life can increase mental vulnerability to immune challenges experienced later in life, which may induce the development of stress-related psychopathologies. Here, we investigated whether the combined effect of both events is higher if the first adverse experience occurs when the brain is still in development. Therefore, male Wistar rats were exposed to repeated social defeat (RSD, first hit) during juvenile age or adulthood and to an immune challenge consisting of a single injection of lipopolysaccharide (LPS, second hit) in adulthood. Control animals were not exposed to RSD, but only to the LPS challenge. Translocator protein density, a marker for reactive microglia, microglia cell density and plasma corticosterone levels were measured using in vivo [ 11C]PBR28 positron emission tomography, iba1 immunostaining, and corticosterone ELISA, respectively. Anhedonia, social behavior and anxiety were measured with the sucrose preference, social interaction, and open field tests, respectively. Rats exposed to RSD during juvenile age exhibited enhanced anhedonia and social interaction dysfunction after an immune challenge in adulthood. This enhanced susceptibility was not observed in rats exposed to RSD during adulthood. In addition, exposure to RSD synergistically increased microglia cell density and glial reactivity to the LPS challenge. This increase in microglia cell density and reactivity to the LPS challenge was more pronounced in rats exposed to RSD during juvenile age than in adulthood. Exposure to RSD alone in juvenile age or adulthood induced similar short-term anhedonia, a long-lasting increase in plasma corticosterone and microglial activity, but no change in anxiety and social behavior. Our findings indicate that exposure to social stress during juvenile age, but not adulthood, primes the immune system and increases the sensitivity to an immune challenge experienced later in life. This suggests that juvenile social stress can have more deleterious effects in the long term than similar stress in adulthood.