Attention broadly enhances cognition, including perception and memory. The enhancement of perception has been linked to modulation of visual areas that code for attended locations or features. How attention enhances memory, however, is not known. The effect of attention on memory may be a downstream consequence of its effect on perception, with better visual representations more amenable to encoding. Alternatively, attention may also modulate brain areas that subserve memory encoding, including regions in the medial temporal lobe (MTL). To examine this latter possibility, we conducted a high-resolution fMRI study in which we manipulated attention in a novel "art gallery" task designed to draw heavily on the MTL. On each trial, participants were first presented with a target room containing a painting. They then viewed four more rooms and searched for either the same room layout from a different perspective (room state) or a painting from the same artist (art state). Critically, the same trials were completed in both tasks, controlling the physical stimuli and allowing top-down attentional states to be identified. In univariate analyses, the perirhinal cortex and hippocampus were more strongly activated by art attention, while the entorhinal and parahippocampal cortices were more strongly activated by room attention. Multivariate analyses revealed greater pattern similarity for same (art/art and room/room) compared to different (art/room) attentional states in all hippocampal subfields and MTL cortical regions. Within the same-state comparisons, greater similarity for room than art attention was observed in all hippocampal subfields, and the entorhinal and parahippocampal cortices. Finally, room-state behavioral performance was strongly and selectively correlated with room-state pattern similarity in the CA2/3 and dentate gyrus subfields of the hippocampus. These results suggest that attention can modulate activity and stabilize activity patterns in the hippocampus and MTL, providing an initial window into how attention affects memory encoding and retrieval.