Three studies examined the self-enhancement function of autobiographical memory (measured with subjective temporal distance of memories). Participants recalled a memory of an attained and a failed goal and rated the subjective distance between each memory and the present. Study 1 showed that young adults with higher self-esteem felt closer to memories of attained goals and farther from failure memories than those with lower self-esteem. In Study 2, young, middle-aged and older adults with higher self-esteem felt closer to success memories, whereas self-esteem was unrelated to the temporal distance of failure memories. In both studies, feeling closer to success memories (and far from failure) led to enhanced mood. In Study 3, state self-esteem was experimentally manipulated. The manipulation had no effect on young and older adults, but middle-aged adults whose self-esteem was decreased, felt closer to success memories than failure memories. Results are discussed in relation to the temporal self-appraisal theory.