Fragile X syndrome (FXS) is the most frequent inherited cause of intellectual disability and the best-studied monogenic cause of autism. FXS results from the functional absence of the fragile X mental retardation protein (FMRP) leading to abnormal pruning and consequently to synaptic communication defects. Here we show that FMRP is a substrate of the small ubiquitin-like modifier (SUMO) pathway in the brain and identify its active SUMO sites. We unravel the functional consequences of FMRP sumoylation in neurons by combining molecular replacement strategy, biochemical reconstitution assays with advanced live-cell imaging. We first demonstrate that FMRP sumoylation is promoted by activation of metabotropic glutamate receptors. We then show that this increase in sumoylation controls the homomerization of FMRP within dendritic mRNA granules which, in turn, regulates spine elimination and maturation. Altogether, our findings reveal the sumoylation of FMRP as a critical activity-dependent regulatory mechanism of FMRP-mediated neuronal function.