In vivo circuit and cellular level functional imaging is a critical tool for understanding the brain in action. High resolution imaging of mouse cortical neurons with two-photon microscopy has provided unique insights into cortical structure, function and plasticity. However, these studies are limited to head fixed animals, greatly reducing the behavioral complexity available for study. In this paper, we describe a procedure for performing chronic fluorescence microscopy with cellular-resolution across multiple cortical layers in freely behaving mice. We used an integrated miniaturized fluorescence microscope paired with an implanted prism probe to simultaneously visualize and record the calcium dynamics of hundreds of neurons across multiple layers of the somatosensory cortex as the mouse engaged in a novel object exploration task, over several days. This technique can be adapted to other brain regions in different animal species for other behavioral paradigms.