Decisions in complex environments rely on flexibly utilizing past experience as required by context and instructions1. This process depends on the medial frontal cortex (MFC) and the medial temporal lobe (MTL)2-5, but it remains unknown how these structures jointly implement flexible memory retrieval6,7. We recorded single neurons in MFC and MTL while human subjects switched8 between making memory- and categorization-based decisions9,10. Here we show that MFC rapidly implements changing task demands by utilizing different subspaces of neural activity during different types of decisions. In contrast, no effect of task demands was seen in the MTL. Choices requiring memory retrieval selectively engaged phase-locking of MFC neurons to field potentials in the theta-frequency band in the MTL. Choice-selective neurons in MFC signaled abstract yes-no decisions independent of behavioral response modality (button press or saccade). These findings reveal a novel mechanism for flexibly and selectively engaging memory retrieval11-14 and show that unlike perceptual decision-making15, memory-related information is only represented in frontal cortex when choices require it.