Developments in miniaturized microscopes have enabled visualization of brain activities and structural dynamics in animals engaging in self-determined behaviors. However, it remains a challenge to resolve activity at single dendritic spines in freely behaving animals. Here, we report the design and application of a fast high-resolution, miniaturized two-photon microscope (FHIRM-TPM) that accomplishes this goal. With a headpiece weighing 2.15 g and a hollow-core photonic crystal fiber delivering 920-nm femtosecond laser pulses, the FHIRM-TPM is capable of imaging commonly used biosensors (GFP and GCaMP6) at high spatiotemporal resolution (0.64 μm laterally and 3.35 μm axially, 40 Hz at 256 × 256 pixels for raster scanning and 10,000 Hz for free-line scanning). We demonstrate the microscope's robustness with hour-long recordings of neuronal activities at the level of spines in mice experiencing vigorous body movements.