Here, the experimental protocols are described for preparing Drosophila at different developmental stages and performing longitudinal optical imaging of Drosophila heartbeats using a custom optical coherence microscopy (OCM) system. The cardiac morphological and dynamical changes can be quantitatively characterized by analyzing the heart structural and functional parameters from OCM images.