Experimental studies have shown conflicting effects of neonatal infection on anxiety-like behaviors and hypothalamic-pituitary-adrenal (HPA) axis activity in adult rats. We investigated for the first time whether neonatal exposure to lipopolysaccharide (LPS) is associated with increased levels of anxiety-like behaviors in mice. Moreover, there have been several studies showing that adolescent fluoxetine (FLX) treatment can influence HPA axis development and prevent occurrence of psychiatric disorders induced by common early-life insults. In the present study, we also investigated the effects of adolescent FLX exposure following neonatal immune activation on anxiety-like behavior in mice. Neonatal mice were treated to LPS (50 μg/kg) or saline on postnatal days (PND) 3 and 5, then male and female mice of both neonatal intervention groups received oral administration of FLX (5 and 10 mg/kg/day) or water via regular drinking bottles during the adolescent period (PNDs 35–65). The results showed that postnatal immune challenge increased anxiety-like behavior in the open field, elevated plus-maze and light–dark box in adult mice (PND 90). Furthermore, the adolescent FLX treatment inhibited the anxiety-like behavior induced by neonatal infection in both sexes. However, this study indicates the negative effects of the FLX on normal behavioral symptoms in male control mice. Taken together, the current data provide experimental evidence that neonatal infection increases anxiety levels in male and female mice in adulthood. Additionally, the findings of this study support the hypothesis that an early pharmacological intervention with FLX may be an effective treatment for reducing the behavioral abnormalities induced by common early-life insults.