The protein complex formed by the Ca 2+ sensor neuronal calcium sensor 1 (NCS-1) and the guanine exchange factor protein Ric8a coregulates synapse number and probability of neurotransmitter release, emerging as a potential therapeutic target for diseases affecting synapses, such as fragile X syndrome (FXS), the most common heritable autism disorder. Using crystallographic data and the virtual screening of a chemical library, we identified a set of heterocyclic small molecules as potential inhibitors of the NCS-1/Ric8a interaction. The aminophenothiazine FD44 interferes with NCS-1/Ric8a binding, and it restores normal synapse number and associative learning in a Drosophila FXS model. The synaptic effects elicited by FD44 feeding are consistent with the genetic manipulation of NCS-1. The crystal structure of NCS-1 bound to FD44 and the structure-function studies performed with structurally close analogs explain the FD44 specificity and the mechanism of inhibition, in which the small molecule stabilizes a mobile C-terminal helix inside a hydrophobic crevice of NCS-1 to impede Ric8a interaction. Our study shows the drugability of the NCS-1/Ric8a interface and uncovers a suitable region in NCS-1 for development of additional drugs of potential use on FXS and related synaptic disorders.fragile X syndrome | synapse regulation | NCS-1 | protein-protein interaction inhibitor | X-ray crystallography