Sex differences in the prevalence of affective disorders might be attributable to different sex hormone milieu. The effects of short-term sex hormone deficiency on behavior, especially on anxiety have been studied in numerous animal experiments, mainly on young adult rats and mice. However, sex differences in aged animals and the effects of long-term hypogonadism are understudied. The aim of our study was to analyze sex differences in anxiety-like behavior in aged rats and to prove whether they can be attributed to endogenous sex hormone production in males. A battery of tests was performed to assess anxiety-like behavior in aged female, male and gonadectomized male rats castrated before puberty. In addition, the aged gonadectomized male rats were treated with a single injection of estradiol or testosterone or supplemented with estradiol for two-weeks. Female rats displayed a less anxious behavior than male rats in most of the conducted behavioral tests except the light-dark box. Long-term androgen deficiency decreased the sex difference in anxiety either partially (open field, PhenoTyper cage) or completely (elevated plus maze). Neither single injection of sex hormones, nor two-week supplementation of estradiol in gonadectomized aged male rats significantly affected their anxiety-like behavior in the elevated plus maze. In conclusion, our results confirm sex differences in anxiety in aged rats likely mediated by endogenous testosterone production in males. Whether long-term supplementation with exogenous sex hormones could affect anxiety-like behavior in elderly individuals remains to be elucidated.