Recent evidence implicates glutamatergic synapses as key pathogenic sites in psychiatric disorders. Common and rare variants in the ANK3 gene, encoding ankyrin-G, have been associated with bipolar disorder, schizophrenia, and autism. Here we demonstrate that ankyrin-G is integral to AMPAR-mediated synaptic transmission and maintenance of spine morphology. Using superresolution microscopy we find that ankyrin-G forms distinct nanodomain structures within the spine head and neck. At these sites, it modulates mushroom spine structure and function, probably as a perisynaptic scaffold and barrier within the spine neck. Neuronal activity promotes ankyrin-G accumulation in distinct spine subdomains, where it differentially regulates NMDA receptor-dependent plasticity. These data implicate subsynaptic nanodomains containing a major psychiatric risk molecule, ankyrin-G, as having location-specific functions and open directions for basic and translational investigation of psychiatric risk molecules.