Spatial working memory, the caching of behaviorally relevant spatial cues on a timescale of seconds, is a fundamental constituent of cognition. While the prefrontal cortex and hippocampus are known to jointly contribute to successful spatial working memory, the anatomical pathway and temporal window for interaction of these structures critical to spatial working memory has not yet been established. Here, we find that direct hippocampal-prefrontal afferents are critical for encoding, but not for maintenance or retrieval, of spatial cues. These cues are represented by the activity of individual prefrontal units in a manner that is dependent on hippocampal input only during the cue-encoding phase of a spatial working memory task. Successful encoding of these cues appears to be mediated by gamma-frequency synchrony between the two structures. These findings indicate a critical role for the direct hippocampal-prefrontal afferent pathway in the continuous updating of task-related spatial information during spatial working memory.