Aging is associated with compromised hippocampal function and reduced adult neurogenesis in the dentate gyrus. As new neurons have been linked to hippocampal functions, such as cognition, age-related decline in new neuron formation may contribute to impaired hippocampal function. We investigated whether a rewarding experience known to stimulate neurogenesis in young adult rats, namely sexual experience, would restore new neuron production and hippocampal function in middle-aged rats. Sexual experience enhanced the number of newly generated neurons in the dentate gyrus with both single and repeated exposures in middle-aged rats. Following continuous long-term exposure to sexual experience, cognitive function was improved. However, when a prolonged withdrawal period was introduced between the final mating experience and behavioral testing, the improvements in cognitive function were lost despite the presence of more new neurons. Taken together, these results suggest that repeated sexual experience can stimulate adult neurogenesis and restore cognitive function in the middle-aged rat as long as the experience persists throughout the testing period. The extent to which changes in adult neurogenesis underlie those in cognition remain unknown. © 2013 Wiley Periodicals, Inc.