Both genetic and pharmacological studies demonstrated that contextual fear conditioning is critically regulated by cyclic AMP-dependent protein kinase (PKA). Since PKA is a broad range protein kinase, a mechanism for confining its activity is required. It has been shown that intracellular spatial compartmentalization of PKA signaling is mediated by A-kinase anchoring proteins (AKAPs). Here, we investigated the role of PKA anchoring to AKAPs in different stages of the memory process (acquisition, consolidation, retrieval and extinction) using contextual fear conditioning, a hippocampus-dependent learning task. Mice were injected intracerebroventricularly or intrahippocampally with the membrane permeable PKA anchoring disrupting peptides St-Ht31 or St-superAKAP-IS at different time points during the memory process. Blocking PKA anchoring to AKAPs resulted in an impairment of fear memory consolidation. Moreover, disrupted PKA anchoring promoted contextual fear extinction in the mouse hippocampus. We conclude that the temporal and spatial compartmentalization of hippocampal PKA signaling pathways, as achieved by anchoring of PKA to AKAPs, is specifically instrumental in long-term contextual fear memory consolidation and extinction, but not in acquisition and retrieval.