The neurophysiological basis of cognition is relatively unexplained, with most studies reporting weak relationships between cognition and measures of brain function, such as event-related potentials, brain size and cerebral blood flow. Magnetic resonance spectroscopy (MRS) is an in vivo method used to detect neurochemicals within the brain that are relevant to certain brain processes. The most widely used methods are 1H-MRS and 31P-MRS, which detect compounds that contain hydrogen and phosphorus, respectively. Recent studies have shown that the absolute concentrations or ratios of these neurochemicals, in particular N-acetyl aspartate (NAA), which is associated with neuronal viability, correlate with performance on neuropsychological tests or other measures of cognitive function in normal subjects. Many studies in adults and children have shown a relationship between neurometabolite values and cognitive status or extent of cognitive dysfunction in various neurological and neuropsychiatric disorders. We review these studies and conclude that MRS has potential applications for the study of cognitive processes in health and disease and may be used clinically for differential diagnosis, the early detection of pathology and the examination of longitudinal change.