The formation and retrieval of a memory is thought to be accomplished by activation and reactivation, respectively, of the memory-holding cells (engram cells) by a common set of neural circuits, but this hypothesis has not been established. The medial temporal-lobe system is essential for the formation and retrieval of episodic memory for which individual hippocampal subfields and entorhinal cortex layers contribute by carrying out specific functions. One subfield whose function is poorly known is the subiculum. Here, we show that dorsal subiculum and the circuit, CA1 to dorsal subiculum to medial entorhinal cortex layer 5, play a crucial role selectively in the retrieval of episodic memories. Conversely, the direct CA1 to medial entorhinal cortex layer 5 circuit is essential specifically for memory formation. Our data suggest that the subiculum-containing detour loop is dedicated to meet the requirements associated with recall such as rapid memory updating and retrieval-driven instinctive fear responses.