The micronucleus is known to be a biomarker for genomic instability, which is a hallmark of tumors and aging. Normally, micronuclei are produced by segregation errors and mechanical stresses arising from dividing or migrating cells, leading to activation of the innate immune response pathway. Although micronuclei often emerge in damaged tissues, the quantitative procedure for analyzing micronuclei accurately has been problematic. Here, we introduce a novel MATLAB-based program for quantifying micronuclei (CAMDi: calculating automatic micronuclei distinction) in vitro and in vivo. CAMDi is adaptable to various experimental imaging techniques and is useful for obtaining reproducible data. CAMDi enables us to measure the accurate size of micronuclei from the three-dimensional images. Using CAMDi, we revealed a novel link between the emergence of micronuclei and neuroinflammation. We found that inflammatory stimulation does not increase the number of micronuclei in primary neurons. On the other hand, the administration of lipopolysaccharide into mice slightly increases micronuclei formation in neurons of the hippocampus region. These findings demonstrate that neuronal micronuclei formations are induced by an inflammatory response in a non-cell-autonomous manner. We provide a novel tool, CAMDi, to quantify micronuclei and demonstrate that neuronal micronuclei are produced not only by the cell-autonomous process but also by the intercellular communication associated with neuroinflammation in vivo.