Precise genome editing via homology-directed repair (HDR) in targeted cells, particularly in vivo, provides an invaluable tool for biomedical research. However, HDR has been considered to be largely restricted to dividing cells, making it challenging to apply the technique in postmitotic neurons. Here we show that precise genome editing via HDR is possible in mature postmitotic neurons as well as mitotic cells in mice brain by combining CRISPR-Cas9-mediated DNA cleavage and the efficient delivery of donor template with adeno-associated virus (AAV). Using this strategy, we achieved efficient tagging of endogenous proteins in primary and organotypic cultures in vitro and developing, adult, aged, and pathological brains in vivo. Thus, AAV- and CRISPR-Cas9-mediated HDR will be broadly useful for precise genome editing in basic and translational neuroscience.