This study longitudinally compared activity in the frontal cortex during a spatial working memory task between 5-year-old and 7-year-old children using near-infrared spectroscopy. Eight children participated in this study twice, once at 5 years and once at 7 years of age. Behavioral analysis showed that older children performed the working memory task more precisely and more rapidly than younger children. Near-infrared spectroscopy analysis showed that right hemisphere dominance was observed in older children, whereas no hemispheric difference was apparent in younger children. Children with strengthened lateralization showed improved performance from 5 to 7 years. We therefore offer the first demonstration of the developmental changes in frontal cortical activation during spatial working memory tasks during the preschool period.