Goal-directed behavior requires adaptive systems that respond to environmental demands. In the absence of threat (or presence of reward), individuals are free to explore a large number of behavioral trajectories, effectively interrogating the environment across many dimensions. This leads to flexible, relational memory encoding and retrieval. In the presence of imminent danger, motivation shifts to an imperative state characterized by a narrow focus of attention on threatening information. This impairs flexible, relational memory. Here, we test how these proposed motivational shifts (Murty & Adcock, 2017) affect behavioral flexibility and memory. Participants learned the structure of a maze-like environment and navigated to the location of everyday objects in both safe and threatening contexts. The latter contained a predator that could ‘capture’ participants, leading to electric shock. After learning, the path to some objects was blocked, forcing a detour for which one route was significantly shorter. We predicted that the threatening environment would push participants toward an imperative state, leading to less efficient and less flexible navigation. Across 3 studies, we found that threat caused participants to take longer paths to goal objects and less efficient detours when obstacles were encountered. Navigation was less efficient despite no impairment in recognition memory for the maps learned in safe vs threatening contexts. These results provide ecologically valid evidence that imperative states, triggered by threat, reduce the ability to flexibly use cognitive maps to guide behavior.