Tanc2 is a large multi‐domain postsynaptic scaffold protein mainly expressed in the brain. In humans, tanc2 mutations have been associated with autism spectrum disorder (ASD) and other related neurodevelopmental disorders. However, the role of tanc2 in neurodevelopment and in controlling behaviors are not fully understood. Here, we generated and characterized a tanc2 knockout allele in zebrafish. Loss of tanc2 increases the larval brain size and body length by promoting proliferation and inhibiting apoptosis. We observed that the glutamatergic neuron population is significantly increased in tanc2 mutants while the GABAergic and the glycinergic neurons are not affected, suggesting that an excitatory/inhibitory (E/I) imbalance. Indeed, the tanc2 knockout larvae exhibited increase sleep. In adult zebrafish, the mutants display anxiolytic‐behavior, reduced aggression, and impaired social preference. The alterations in these behaviors are phenotypically similar to the ASD patients carrying tanc2 mutations. Therefore, the tanc2 knockout allele could serve as a valuable model to further study the role of tanc2 in the nervous system.