The immunomodulatory function of nitric oxide synthase (NOS2) has been extensively studied. However, some behavioral abnormalities caused by its mutations have been found in a few rodent studies, of which the molecular mechanism remains elusive. In this research, we generated nos2b gene knockout zebrafish (nos2bsou2/sou2) using CRISPR/Cas9 approach and investigated their behavioral and molecular changes by doing a series of behavioral detections, morphological measurements, and molecular analyses. We found that, compared with nos2b+/+ zebrafish, nos2bsou2/sou2 zebrafish exhibited enhanced motor activity; additionally, nos2bsou2/sou2 zebrafish were characterized by smaller brain size, abnormal structure of optic tectum, reduced mRNA level of presynaptic synaptophysin and postsynaptic homer1, and altered response to sodium nitroprusside/methylphenidate hydrochloride treatment. These findings will likely contribute to future studies of behavioral regulation.