The prefrontal cortex is critical for working memory, over a timescale of seconds. In this Review, Miller and Constantinidis examine how the prefrontal cortex facilitates the integration of memory systems across other timescales as well. In this framework of prefrontal learning, short-term memory and long-term memory interact to serve goal-directed behaviour.