Pinpointing the precise age when young animals begin to form memories of aversive events is valuable for understanding the onset of anxiety and mood disorders and for detecting early cognitive impairment in models of childhood-onset disorders. Although these disorders are most commonly modeled in mice, we know little regarding the development of learning and memory in this species because most previous studies have been restricted to rats. Therefore, in the present study, we constructed an ontogenetic timeline of contextual fear memory ranging from infancy to adulthood in mice. We found that the ability of mice to form long-term context-shock associations emerged 13 -14 d of age, which is several days earlier than previously reported for rats. Although the ability to form contextual fear memories remained stable from infancy into adulthood, infant mice had shorter-lasting memories than adolescent and adult mice. Furthermore, we found that mice subjected to fetal alcohol exposure showed a delay in the developmental emergence of contextual fear memory, illustrating the utility of this ontogenetic approach in detecting developmental delays in cognitive function stemming from maladaptive early life experience.