Can babies think? A fundamental challenge for cognitive neuroscience is to answer when brain functions begin and in what form they first emerge. This is challenging with behavioral tasks, as it is difficult to communicate to an infant what a task requires, and motor function is impoverished, making execution of the appropriate response difficult. To circumvent these requirements, neuroimaging provides a complementary route for assessing the emergence of cognition. Starting from the prerequisites of cognitive function and building stepwise, we review when the cortex forms and when it becomes gyrated and regionally differentiated. We then discuss when white matter tracts mature and when functional brain networks arise. Finally, we assess the responsiveness of these brain systems to external events. We find that many cognitive systems are observed surprisingly early. Some emerge before birth, with activations in the frontal lobe even in the first months of gestation. These discoveries are changing our understanding of the nature of cognitive networks and their early function, transforming cognitive neuroscience, and opening new windows for education and investigation. Infant neuroimaging also has tremendous clinical potential, for both detecting atypical development and facilitating earlier intervention. Finally, we discuss the key technical developments that are enabling this nascent field.