Historically, people who study interactions between plants and herbivores focused on the ecological costs and benefits of synthesizing secondary metabolites. These compounds have diverse functions including defenses against herbivores. Some plants produce alkaloids that act as acetylcholinesterase inhibitors, increasing both the level and duration of action of the neurotransmitter acetylcholine with potential toxic effects in insects and mammals. Yet, among a number of neuroactive plant chemicals, alkaloids that inhibit acetylcholinesterase (AIA) display nootropic activities, that is, positively affect cognition, learning, and memory in mammals. This creates a paradox: Neuroactive AIA, expected to punish herbivores, enhance cognition, learning, and memory. A prevailing view is AIA are pesticides that adversely affecting the nervous systems of herbivorous insects, and the positive influences in mammals are merely a by‐product of other functions. We review literature on the behavioral ecology of diet choice, food‐aversion learning, and neurophysiological actions of AIA in mammals to provide a more comprehensive view of the adaptive significance of AIA. These compounds act as anti‐herbivory defenses that influence flavor (taste plus odor) preference/aversion, the formation of memories, and the feeding behavior of mammalian herbivores. Thus, what appears from an insect standpoint to be an enigma makes sense for mammals: AIA enable mammalian herbivores to quickly learn and remember specific plant(s) and the locations where they ate those plant(s). We provide examples of AIA, synthesized by over 200 plant species in 16 families, which affect learning and memory in mammals. Using 36 examples of acetylcholinesterase inhibitors synthesized by plants in 58 families, we also show that acetylcholinesterase blockers contribute to anti‐herbivore chemical defense by affecting food‐aversion learning and memory in mammalian herbivores. We provide an evolutionary rationale for why natural selection may favor synthesis of chemicals that positively affect mental functions of herbivores. Our hypothesis, which challenges the current view that plant chemical defenses are aimed solely at destabilizing herbivore physiology, facilitates a broader understanding of diet preferences and feeding behavior in mammalian herbivores