The ability to acquire large-scale recordings of neuronal activity in awake and unrestrained animals poses a major challenge for studying neural coding of animal behavior. We present a new instrument capable of recording intracellular calcium transients from every neuron in the head of a freely behaving C. elegans with cellular resolution while simultaneously recording the animals position, posture and locomotion. We employ spinning-disk confocal microscopy to capture 3D volumetric fluorescent images of neurons expressing the calcium indicator GCaMP6s at 5 head-volumes per second. Two cameras simultaneously monitor the animals position and orientation. Custom software tracks the 3D position of the animals head in real-time and adjusts a motorized stage to keep it within the field of view as the animal roams freely. We observe calcium transients from 78 neurons and correlate this activity with the animals behavior. Across worms, multiple neurons show significant correlations with modes of behavior corresponding to forward, backward, and turning locomotion. By comparing the 3D positions of these neurons with a known atlas, our results are consistent with previous single-neuron studies and demonstrate the existence of new candidate neurons for behavioral circuits.