Neuroligins are neuronal and neuromuscular transmembrane proteins that have been implicated in autism spectrum disorder and other cognitive diseases. The nlg-1 gene from Caenorhabditis elegans is orthologous to human neuroligin genes. In the nematode, the locomotory rate is mediated by dopaminergic and serotonergic pathways, which result in two different behavioral responses known as basal slowing response (BSR) and enhanced slowing response (ESR), respectively. We report that nlg-1-deficient mutants are defective in both the BSR and ESR behaviors. In addition, we demonstrate that methylphenidate (a dopamine reuptake inhibitor) and fluoxetine (a serotonin reuptake inhibitor), two drugs widely used for the treatment of behavioral disorders in humans, are able to restore the BSR and ESR wild type phenotypes, respectively, in nlg-1 defective mutant nematodes. The abnormal locomotory behavior patterns were rescued in nlg-1-deficient mutant by expressing a cDNA from the human NLGN1 gene under the C. elegans nlg-1 promoter. However, human NLGN1 (R453C) and NLGN1 (D432X) mutant alleles did not rescue any of the two mutant phenotypes. The results indicate that neuroligin is involved in modulating the action of dopamine and serotonin in the nematode and suggest that the functional mechanism underpinning both methylphenidate and fluoxetine in C. elegans might be comparable to that in humans. The neuroligin-deficient mutants may undergo inefficient synaptic transmissions which could affect different traits in the nervous system. In particular, neuroligin might be required for normal neurotransmitters release. The understanding of the mechanisms by which methylphenidate and fluoxetine are able to restore the behavior of these mutants could help to explain the etiology of some human neurological diseases.