N-methyl-d-aspartate (NMDA) glutamate receptors play crucial roles in neuronal synaptic plasticity, learning and memory. However, as to whether different NMDA subunits are implicated in specific forms of memory is unclear. Moreover, nothing is known about the interspecific genetic variability of the GRIN2A subunit and how this variation can potentially explain evolutionary changes in behavioral phenotypes. Here, we used 28 primate GRIN2A sequences and various proxies of memory across primates to investigate the role of GRIN2A. Codon-specific sequence analysis on these sequences showed that GRIN2A in primates coevolved with a likely ecological proxy of spatial memory (relative home-range size) but not with other indices of non-spatial learning and memory such as social memory and social learning. Models based on gene averages failed to detect positive selection in primate branches with major changes in relative home-range size. This implies that accelerated evolution is concentrated in specific parts of the protein expressed by GRIN2A. Overall, our molecular evolution study, the first on GRIN2A, supports the notion that different NMDA subunits may play a role in specific forms of memory and that phenotypic diversity along with genetic evolution can be used to investigate the link between genes and behavior across evolutionary time.