The study of the chemical substances and processes in the nervous system that regulate brain function and behavior.