Information gleaned from learning and memory processes is essential in guiding behavior toward a specific goal. However, the neural mechanisms that determine how these processes are effectively utilized to guide goal-directed behavior are unknown. Here, we show that rats utilize retrospective and prospective memory and flexible switching between these 2 memory processes to guide behaviors to obtain rewards. We found that retrospective memory is mainly processed in the hippocampus (HPC) but that this retrospective information must be incorporated within the prefrontal cortex (PFC) to be used to switch to an anticipatory response strategy involving prospective memory. Furthermore, switching between memory processes is regulated by the mesocortical dopamine (DA) system. Thus, DA D1 and D2 receptor activation in the PFC differentially affects retrospective memory processing within the HPC via an indirect feedback pathway. In contrast, D1, but not D2, receptor activation is crucial for incorporation of HPC-based retrospective information into the PFC. However, once this takes place, D2 receptor activation is required for further processing of information to effect preparation of future actions. These results provide a unique perspective on the mechanism of memory-based goal-directed behavior.