Inflammasomes are the protein assemblies that consist of inflammasome sensors, adaptor apoptosis-associated speck-like proteins containing a CARD (ASC) and inflammasome caspase. Inflammasomes sense multiple danger signals via various inflammasome sensors and consequently use caspase to trigger proteolytic processing and secretion of IL-1β cytokines. Recent studies have suggested that neurons use their own innate immune system to detect danger signals and regulate neuronal morphology. Here, we investigate whether inflammasomes, the critical components of innate immunity, participate in regulation of neuronal morphology and function. Among various sensors, Absent in melanoma 2 (Aim2) expression in neurons is most prominent. Adding synthetic double-stranded DNA (dsDNA) to cultured neurons induces IL-1β secretion in an AIM2-dependent manner and consequently downregulates dendritic growth but enhances axon extension. The results of Aim2 knockout and knockdown show that AIM2 acts cell-autonomously to regulate neuronal morphology. Behavioral analyses further reveal that Aim2−/− mice exhibit lower locomotor activity, increased anxious behaviors and reduced auditory fear memory. In conclusion, our study suggests that AIM2 inflammasomes regulate neuronal morphology and influence mouse behaviors.