Trans-synaptic adhesion molecules, a family of cell adhesion molecules that mediate the coordinated interactions between pre- and postsynaptic membrane, are thought to mediate target recognition, initiate synapse formation and alignment, maintain the integrity of synapse, and regulate synaptic function during synapse development and remodeling. Among these, neurexins-a family of highly conserved neuron-specific transmembrane proteins have been proposed to act as a key synapse organizer required for synapse formation and neurotransmitter release. However, their in vivo functions remain elusive, particularly due to the complexity and redundancy of mammalian neurexin genes. Here, we report the cloning and characterization of the Drosophila homolog of neurexin genes. In contrast to the presence of 3 neurexin genes in mammals, we found that the Drosophila genome contains a single neurexin gene, which we named Drosophila neurexin (dnrx). In situ hybridization and immunohistochemical analyses revealed that dnrx is expressed in neurons of central nervous system (CNS) and localized to CNS synaptic regions, axons and glutamatergic neuromuscular junctions (NMJs) during development. At larval NMJ, DNRX is concentrated at active zones, but also extends into periactive zones within synaptic boutons. We have obtained null mutations in the single dnrx gene. Using Drosophila NMJs, an excellent in vivo synapse model system, we demonstrate that dnrx loss of function prevents the normal proliferation of synaptic boutons, while dnrx gain of function in neurons has the opposite effect. Synaptic vesicle and active zone component markers are mislocalized along dnrx mutant axons, suggesting that DNRX is required for the proper recruitment and localization of key synaptic components during presynaptic differentiation. Postsynaptically, the distribution of postsynaptic density (PSD) proteins is enlarged. Conspicuously, dnrx null mutants display striking defects in synaptic ultrastructure with the presence of detachments between pre- and postsynaptic membranes, abnormally long active zones, and increased number of T-bars. These abnormalities result in corresponding alterations in synaptic transmission with reduced neurotransmitter release. Together, our results provide compelling evidence for an in vivo role of neurexins in the control of synapse growth, the modulation of synaptic architecture and adhesive interactions between pre- and postsynaptic compartments in vivo.