Synaptic activity triggers a profound reorganization of the molecular composition of excitatory synapses. For example, NMDA receptors are removed from synapses in an activity- and calcium-dependent manner, via casein kinase 2 (CK2) phosphorylation of the PDZ ligand of the GluN2B subunit (S1480). However, how synaptic activity drives this process remains unclear because CK2 is a constitutively active kinase, which is not directly regulated by calcium. We show here that activated CaMKII couples GluN2B and CK2 to form a trimolecular complex and increases CK2-mediated phosphorylation of GluN2B S1480. In addition, a GluN2B mutant, which contains an insert to mimic the GluN2A sequence and cannot bind to CaMKII, displays reduced S1480 phosphorylation and increased surface expression. We find that although disrupting GluN2B/CaMKII binding reduces synapse number, it increases synaptic-GluN2B content. Therefore, the GluN2B/CaMKII association controls synapse density and PSD composition in an activity-dependent manner, including recruitment of CK2 for the removal of GluN2B from synapses.