Recently, the zebrafish (Danio rerio) has been established as a key animal model in neuroscience. Behavioral, genetic, and immunohistochemical techniques have been used to describe the connectivity of diverse neural circuits. However, few studies have used zebrafish to understand the function of cerebral structures or to study neural circuits. Information about the techniques used to obtain a workable preparation is not readily available. Here, we describe a complete protocol for obtaining in vitro and in vivo zebrafish brain preparations. In addition, we performed extracellular recordings in the whole brain, brain slices, and immobilized nonanesthetized larval zebrafish to evaluate the viability of the tissue. Each type of preparation can be used to detect spontaneous activity, to determine patterns of activity in specific brain areas with unknown functions, or to assess the functional roles of different neuronal groups during brain development in zebrafish. The technique described offers a guide that will provide innovative and broad opportunities to beginner students and researchers who are interested in the functional analysis of neuronal activity, plasticity, and neural development in the zebrafish brain.